Merge branch '2016.3' into '2016.11'

No conflicts.
This commit is contained in:
rallytime 2016-11-16 09:27:06 -07:00
commit 1aa463b4c1
6 changed files with 56 additions and 36 deletions

View File

@ -325,7 +325,7 @@ class Pillar(object):
opts['grains'] = {}
else:
opts['grains'] = grains
if 'environment' not in opts:
if not opts.get('environment'):
opts['environment'] = saltenv
opts['id'] = self.minion_id
if 'pillarenv' not in opts:

View File

@ -109,8 +109,9 @@ it:
'*':
- bar
If ``__env__`` is specified as the branch name, then git_pillar will use the
branch specified by :conf_master:`gitfs_base`:
If ``__env__`` is specified as the branch name, then git_pillar will first look
at the minion's :conf_minion:`environment` option. If unset, it will fall back
to using branch specified by the master's :conf_master:`gitfs_base`:
.. code-block:: yaml
@ -133,6 +134,11 @@ The corresponding Pillar top file would look like this:
described above. For 2016.3.4 and later, refer to explanation of the
``__env__`` parameter in the below section.
Versions 2016.3.0 through 2016.3.4 incorrectly check the *master's*
``environment`` config option (instead of the minion's) before falling back
to :conf_master:`gitfs_base`. This has been fixed in the 2016.3.5 and
2016.11.1 releases (2016.11.0 contains the incorrect behavior).
.. _git-pillar-2015-8-0-and-later:
Configuring git_pillar for Salt releases 2015.8.0 and later
@ -233,15 +239,25 @@ The corresponding Pillar top file would look like this:
.. note::
This feature was unintentionally omitted when git_pillar was rewritten for
the 2015.8.0 release. It was added again in the 2016.3.4 release, but it
has changed slightly in that release. On Salt masters running 2015.8.0
through 2016.3.3, this feature can only be accessed using the legacy config
in the previous section of this page.
For 2016.3.4 and later, the above example is accurate, and the value
replaced by ``__env__`` is :conf_master:`git_pillar_base`, while the legacy
config's version of this feature replaces ``__env__`` with
has changed slightly in that release. The fallback value replaced by
``{{env}}`` is :conf_master: is :conf_master:`git_pillar_base`, while the
legacy config's version of this feature replaces ``{{env}}`` with
:conf_master:`gitfs_base`.
On Salt masters running 2015.8.0 through 2016.3.3, this feature can only be
accessed using the legacy config in the previous section of this page.
The same issue which affected the behavior of the minion's
:conf_minion:`environment` config value using the legacy configuration
syntax (see the documentation in the pre-2015.8.0 section above for the
legacy support of this feature) also affects the new-style git_pillar
syntax in version 2016.3.4. This has been corrected in version 2016.3.5 and
2016.11.1 (2016.11.0 contains the incorrect behavior).
2016.3.4 incorrectly checks the *master's* ``environment`` config option
(instead of the minion's) before falling back to the master's
:conf_master:`git_pillar_base`.
With the addition of pygit2_ support, git_pillar can now interact with
authenticated remotes. Authentication works just like in gitfs (as outlined in
the :ref:`Git Fileserver Backend Walkthrough <gitfs-authentication>`), only

View File

@ -747,12 +747,12 @@ def _listeners_present(
expected_listeners_by_tuple = {}
for l in listeners:
key = __salt__['boto_elb.listener_dict_to_tuple'](l)
expected_listeners_by_tuple[key] = l
l_key = __salt__['boto_elb.listener_dict_to_tuple'](l)
expected_listeners_by_tuple[l_key] = l
actual_listeners_by_tuple = {}
for l in lb['listeners']:
key = __salt__['boto_elb.listener_dict_to_tuple'](l)
actual_listeners_by_tuple[key] = l
l_key = __salt__['boto_elb.listener_dict_to_tuple'](l)
actual_listeners_by_tuple[l_key] = l
to_delete = []
to_create = []

View File

@ -127,12 +127,16 @@ def installed(name,
for pkg_details in installed_pkgs.values():
try:
pkg_from = pkg_details.get('from', '').split('://')[1]
# Catch condition where we may have specified package as
# git://github.com/foo/bar but packager describes it as
# git://github.com/foo/bar.git in the package
if not pkg_from.endswith('.git') and pkg_name.startswith('git://'):
pkg_from += '.git'
if pkg_name.split('://')[1] == pkg_from:
return True
except IndexError:
pass
return False
for pkg in pkg_list:
pkg_name, _, pkg_ver = pkg.partition('@')
pkg_name = pkg_name.strip()

View File

@ -330,15 +330,13 @@ def filesystem_present(name, create_parent=False, properties=None, cloned_from=N
properties : dict
additional zfs properties (-o)
..note::
.. note::
``cloned_from`` is only use if the filesystem does not exist yet,
when ``cloned_from`` is set after the filesystem exists it will be ignored.
..note::
properties do not get cloned, if you specify the properties in the state file
they will be applied on a subsequent run.
.. note::
Properties do not get cloned, if you specify the properties in the
state file they will be applied on a subsequent run.
'''
ret = {'name': name,
@ -442,20 +440,19 @@ def volume_present(name, volume_size, sparse=False, create_parent=False, propert
properties : dict
additional zfs properties (-o)
..note::
.. note::
``cloned_from`` is only use if the volume does not exist yet,
when ``cloned_from`` is set after the volume exists it will be ignored.
..note::
properties do not get cloned, if you specify the properties in the state file
.. note::
Properties do not get cloned, if you specify the properties in the state file
they will be applied on a subsequent run.
volume_size is considered a property so it the volume's size will be corrected
when the properties get update if it differs from the original volume.
``volume_size`` is considered a property, so the volume's size will be
corrected when the properties get updated if it differs from the
original volume.
the sparse parameter is ignored when using cloned_from.
The sparse parameter is ignored when using ``cloned_from``.
'''
ret = {'name': name,
@ -603,9 +600,8 @@ def snapshot_present(name, recursive=False, properties=None):
properties : dict
additional zfs properties (-o)
..note:
properties are only set at creation time.
.. note:
Properties are only set at creation time
'''
ret = {'name': name,

View File

@ -23,6 +23,8 @@ from salt.config import cloud_providers_config
# Import Third-Party Libs
from salt.ext.six.moves import range
TIMEOUT = 500
try:
import azure # pylint: disable=unused-import
HAS_AZURE = True
@ -143,11 +145,12 @@ class AzureTest(integration.ShellCase):
'-p {0} {1}'.format(
PROFILE_NAME,
INSTANCE_NAME
)
), timeout=TIMEOUT
)]
)
except AssertionError:
self.run_cloud('-d {0} --assume-yes'.format(INSTANCE_NAME))
self.run_cloud('-d {0} --assume-yes'.format(INSTANCE_NAME),
timeout=TIMEOUT)
raise
# delete the instance
@ -157,7 +160,7 @@ class AzureTest(integration.ShellCase):
[i.strip() for i in self.run_cloud(
'-d {0} --assume-yes'.format(
INSTANCE_NAME
)
), timeout=TIMEOUT
)]
)
except AssertionError:
@ -172,7 +175,8 @@ class AzureTest(integration.ShellCase):
# if test instance is still present, delete it
if ret_str in query:
self.run_cloud('-d {0} --assume-yes'.format(INSTANCE_NAME))
self.run_cloud('-d {0} --assume-yes'.format(INSTANCE_NAME),
timeout=TIMEOUT)
if __name__ == '__main__':