mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #42126 from rallytime/merge-2017.7
[2017.7] Merge forward from 2016.11 to 2017.7
This commit is contained in:
commit
8f1cb287cf
7 changed files with 56 additions and 36 deletions
|
@ -64,7 +64,9 @@ automatically installed salt-cloud for you. Use your distribution's package
|
|||
manager to install the ``salt-cloud`` package from the same repo that you
|
||||
used to install Salt. These repos will automatically be setup by Salt Bootstrap.
|
||||
|
||||
If there is no salt-cloud package, install with ``pip install salt-cloud``.
|
||||
Alternatively, the ``-L`` option can be passed to the `Salt Bootstrap`_ script when
|
||||
installing Salt. The ``-L`` option will install ``salt-cloud`` and the required
|
||||
``libcloud`` package.
|
||||
|
||||
.. _`Salt Bootstrap`: https://github.com/saltstack/salt-bootstrap
|
||||
|
||||
|
|
|
@ -12,7 +12,9 @@ automatically installed salt-cloud for you. Use your distribution's package
|
|||
manager to install the ``salt-cloud`` package from the same repo that you
|
||||
used to install Salt. These repos will automatically be setup by Salt Bootstrap.
|
||||
|
||||
If there is no salt-cloud package, install with ``pip install salt-cloud``.
|
||||
Alternatively, the ``-L`` option can be passed to the `Salt Bootstrap`_ script when
|
||||
installing Salt. The ``-L`` option will install ``salt-cloud`` and the required
|
||||
``libcloud`` package.
|
||||
|
||||
.. _`Salt Bootstrap`: https://github.com/saltstack/salt-bootstrap
|
||||
|
||||
|
|
5
doc/topics/releases/2016.11.7.rst
Normal file
5
doc/topics/releases/2016.11.7.rst
Normal file
|
@ -0,0 +1,5 @@
|
|||
============================
|
||||
Salt 2016.11.7 Release Notes
|
||||
============================
|
||||
|
||||
Version 2016.11.7 is a bugfix release for :ref:`2016.11.0 <release-2016-11-0>`.
|
|
@ -8,7 +8,7 @@ Installing/Testing a Salt Release Candidate
|
|||
|
||||
It's time for a new feature release of Salt! Follow the instructions below to
|
||||
install the latest release candidate of Salt, and try :ref:`all the shiny new
|
||||
features <release-2016-11-0>`! Be sure to report any bugs you find on `Github
|
||||
features <release-2017-7-0>`! Be sure to report any bugs you find on `Github
|
||||
<https://github.com/saltstack/salt/issues/new/>`_.
|
||||
|
||||
Installing Using Packages
|
||||
|
@ -32,32 +32,10 @@ Builds for a few platforms are available as part of the RC at https://repo.salts
|
|||
|
||||
Available builds:
|
||||
|
||||
- Amazon Linux
|
||||
- Debian 8
|
||||
- macOS
|
||||
- RHEL 7
|
||||
- SmartOS (see below)
|
||||
- Ubuntu 16.04
|
||||
- Windows
|
||||
|
||||
.. FreeBSD
|
||||
|
||||
SmartOS
|
||||
-------
|
||||
Release candidate builds for SmartOS are available at http://pkg.blackdot.be/extras/salt-2016.11rc/.
|
||||
|
||||
On a base64 2015Q4-x86_64 based native zone the package can be installed by the following:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pfexec pkg_add -U https://pkg.blackdot.be/extras/salt-2016.11rc/salt-2016.11.0rc2_2015Q4_x86_64.tgz
|
||||
|
||||
When using the 2016Q2-tools release on the global zone by the following:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
pfexec pkg_add -U https://pkg.blackdot.be/extras/salt-2016.11rc/salt-2016.11.0rc2_2016Q2_TOOLS.tgz
|
||||
|
||||
Installing Using Bootstrap
|
||||
==========================
|
||||
|
||||
|
@ -67,14 +45,14 @@ You can install a release candidate of Salt using `Salt Bootstrap
|
|||
.. code-block:: bash
|
||||
|
||||
curl -o install_salt.sh -L https://bootstrap.saltstack.com
|
||||
sudo sh install_salt.sh -P git v2016.11.0rc2
|
||||
sudo sh install_salt.sh -P git v2017.7.0rc1
|
||||
|
||||
If you want to also install a master using Salt Bootstrap, use the ``-M`` flag:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
curl -o install_salt.sh -L https://bootstrap.saltstack.com
|
||||
sudo sh install_salt.sh -P -M git v2016.11.0rc2
|
||||
sudo sh install_salt.sh -P -M git v2017.7.0rc1
|
||||
|
||||
If you want to install only a master and not a minion using Salt Bootstrap, use
|
||||
the ``-M`` and ``-N`` flags:
|
||||
|
@ -82,13 +60,13 @@ the ``-M`` and ``-N`` flags:
|
|||
.. code-block:: bash
|
||||
|
||||
curl -o install_salt.sh -L https://bootstrap.saltstack.com
|
||||
sudo sh install_salt.sh -P -M -N git v2016.11.0rc2
|
||||
sudo sh install_salt.sh -P -M -N git v2017.7.0rc1
|
||||
|
||||
Installing Using PyPI
|
||||
=====================
|
||||
|
||||
Installing from the `source archive
|
||||
<https://pypi.python.org/packages/7a/87/3b29ac215208bed9559d6c4df24175ddd1d52e62c5c00ae3afb3b7d9144d/salt-2016.11.0rc2.tar.gz>`_ on
|
||||
<https://pypi.python.org/packages/5c/cf/13c14f8bcd7b5076b9a8c3580f9582c1c4ea8b0458793ac6744ea66c0baf/salt-2017.7.0rc1.tar.gz>`_ on
|
||||
`PyPI <https://pypi.python.org/pypi>`_ is fairly straightforward.
|
||||
|
||||
.. note::
|
||||
|
@ -126,4 +104,4 @@ Then install salt using the following command:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
sudo pip install salt==2016.11.0rc2
|
||||
sudo pip install salt==2017.7.0rc1
|
||||
|
|
|
@ -73,7 +73,7 @@ class SudoExecutor(ModuleExecutorBase):
|
|||
'-c', salt.syspaths.CONFIG_DIR,
|
||||
'--',
|
||||
data.get('fun')]
|
||||
if data['fun'] == 'state.sls':
|
||||
if data['fun'] in ('state.sls', 'state.highstate', 'state.apply'):
|
||||
kwargs['concurrent'] = True
|
||||
for arg in args:
|
||||
self.cmd.append(_cmd_quote(str(arg)))
|
||||
|
|
|
@ -1092,11 +1092,15 @@ def install(name=None, refresh=False, pkgs=None, **kwargs):
|
|||
ret[pkg_name] = 'Unable to locate package {0}'.format(pkg_name)
|
||||
continue
|
||||
|
||||
# Get the version number passed or the latest available
|
||||
# Get the version number passed or the latest available (must be a string)
|
||||
version_num = ''
|
||||
if options:
|
||||
if options.get('version') is not None:
|
||||
version_num = str(options.get('version'))
|
||||
version_num = options.get('version', '')
|
||||
# Using the salt cmdline with version=5.3 might be interpreted
|
||||
# as a float it must be converted to a string in order for
|
||||
# string matching to work.
|
||||
if not isinstance(version_num, six.string_types) and version_num is not None:
|
||||
version_num = str(version_num)
|
||||
|
||||
if not version_num:
|
||||
version_num = _get_latest_pkg_version(pkginfo)
|
||||
|
@ -1423,6 +1427,11 @@ def remove(name=None, pkgs=None, version=None, **kwargs):
|
|||
continue
|
||||
|
||||
if version_num is not None:
|
||||
# Using the salt cmdline with version=5.3 might be interpreted
|
||||
# as a float it must be converted to a string in order for
|
||||
# string matching to work.
|
||||
if not isinstance(version_num, six.string_types) and version_num is not None:
|
||||
version_num = str(version_num)
|
||||
if version_num not in pkginfo and 'latest' in pkginfo:
|
||||
version_num = 'latest'
|
||||
elif 'latest' in pkginfo:
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Import Python libs
|
||||
from __future__ import absolute_import
|
||||
import socket
|
||||
|
||||
# Import Salt Testing libs
|
||||
from tests.support.unit import skipIf
|
||||
|
@ -109,8 +110,31 @@ class NetworkTestCase(TestCase):
|
|||
changed. In these cases, we just need to update the IP address in the
|
||||
assertion.
|
||||
'''
|
||||
ret = network.host_to_ips('www.saltstack.com')
|
||||
self.assertEqual(ret, ['104.197.168.128'])
|
||||
def _side_effect(host, *args):
|
||||
try:
|
||||
return {
|
||||
'github.com': [
|
||||
(2, 1, 6, '', ('192.30.255.112', 0)),
|
||||
(2, 1, 6, '', ('192.30.255.113', 0)),
|
||||
],
|
||||
'ipv6host.foo': [
|
||||
(10, 1, 6, '', ('2001:a71::1', 0, 0, 0)),
|
||||
],
|
||||
}[host]
|
||||
except KeyError:
|
||||
raise socket.gaierror(-2, 'Name or service not known')
|
||||
|
||||
getaddrinfo_mock = MagicMock(side_effect=_side_effect)
|
||||
with patch.object(socket, 'getaddrinfo', getaddrinfo_mock):
|
||||
# Test host that can be resolved
|
||||
ret = network.host_to_ips('github.com')
|
||||
self.assertEqual(ret, ['192.30.255.112', '192.30.255.113'])
|
||||
# Test ipv6
|
||||
ret = network.host_to_ips('ipv6host.foo')
|
||||
self.assertEqual(ret, ['2001:a71::1'])
|
||||
# Test host that can't be resolved
|
||||
ret = network.host_to_ips('someothersite.com')
|
||||
self.assertEqual(ret, None)
|
||||
|
||||
def test_generate_minion_id(self):
|
||||
self.assertTrue(network.generate_minion_id())
|
||||
|
|
Loading…
Add table
Reference in a new issue