This resolves a case in which a directory being managed by a
file.directory state was running a sphinx build, and temporary
files/dirs created by the build were present when the initial walk was
performed but were cleaned up by the time the state got around to
enforcing permissions.
yumpkg.list_upgrades returns an empty dictionary when no upgrades are available.
We need to check for this situation and skip the test if no upgrades are present.
Fixes the test failure on Fedora 24 on Jenkins currently, but also protects against
any potential failures for other RHEL-based distros that aren't currently failing
because "ret" is populated with a dictionary of upgrades.
This should fixup the failing integration.states.alternatives test
in 2016.3 as well. The alternatives.install state relies on checking
if the output of alternatives.show_link matches the path passed into
the state. Since show_link didn't work on suse correctly, the state
doesn't install the alternative and returns False.
Slave interfaces have some of their parameters overridden before being written
to file, but when Salt is ran in test mode, those overridden values aren't
taken into account. This results in the test run showing that changes will be
applied, even though the configuration hasn't changed at all:
ID: ens2f1
Function: network.managed
Result: None
Comment: Interface ens2f1 is set to be updated:
---
+++
@@ -1,4 +1,3 @@
auto ens2f1
-iface ens2f1 inet manual
- bond-master bond0
+iface ens2f1 inet static
Started: 09:07:41.719716
Duration: 1.91 ms
Changes:
This commit overrides those values in _parse_settings_eth instead of
_write_file_ifaces, so that the test run shows what's really going to be
modified.
glance.image_list now returns a list of images instead of a dict, but
the glance state tried to use the values() method on it either way,
leading to the following exception:
An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1733, in call
**cdata['kwargs'])
File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1652, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/salt/states/glance.py", line 155, in image_present
image, msg = _find_image(name)
File "/usr/lib/python2.7/dist-packages/salt/states/glance.py", line 60, in _find_image
return images_dict.values()[0], 'Found image {0}'.format(name)
AttributeError: 'list' object has no attribute 'values'
This commit makes sure that we're always working with a list, even if
glance.image_list returns a dict.
keystoneclient.apiclient.exceptions has been deprecated since 0.7.1 in
favor of keystoneclient.exceptions, and has been removed in 2.1.0, so
the glance state fails to load with recent versions of keystoneclient.
This commit tries to import from keystoneclient.exceptions first, and
falls back to keystoneclient.apiclient.exceptions if that fails.
ext_pillar was being merged into pillar, when it should have been the
other way around. This means that when ext_pillar_first was enabled,
pillar keys with the same name as ones defined in ext_pillar were being
lost instead of overriding ext_pillar.