Commit Graph

76973 Commits

Author SHA1 Message Date
Mike Place
705e1d8a08 Merge pull request #40562 from terminalmage/fix-get-client
Fix dockerng _get_client() regression
2017-04-06 12:25:18 -06:00
Mike Place
74366c57a4 Merge pull request #40564 from techhat/azuredocs
Update Azure ARM docs
2017-04-06 12:17:31 -06:00
Mike Place
74c65557dd Add space before in-lint comment for lint 2017-04-06 11:32:22 -06:00
Erik Johnson
cb4db56eb5 Allow pillar.get to merge list as well as dictionaries
This also gets rid of the exception that used to be raised when the
default was not of the proper type, and instead skips merging in those
cases.
2017-04-06 12:24:22 -05:00
Erik Johnson
a7a78da984 remove unused imports 2017-04-06 11:12:07 -05:00
Joseph Hall
08d071bc68 Update Azure ARM docs 2017-04-06 09:43:19 -06:00
Erik Johnson
7f1ef72f83 Fix dockerng _get_client() regression
This fixes a regression I introduced the other day in #40481 when I
backported auth fixes to 2016.3. I changed how the client was
instantiated and ended up passing an unsupported kwarg to the wrapped
function. This resolves that regression.
2017-04-06 10:32:35 -05:00
Erik Johnson
a6d68f50fe Merge remote-tracking branch 'upstream/2016.3' into merge-2016.3-2016.11 2017-04-06 10:15:47 -05:00
Nicole Thomas
00f8ef0c55 Merge pull request #40548 from Ch3LL/fix_vultrpy
Fix vultrpy
2017-04-06 09:13:51 -06:00
Erik Johnson
a717881f53 Just get a hash for the source archive
file.get_source_sum doesn't actually return a hash, it just
disambiguates a passed hash from a hash extracted from a hash file.
2017-04-06 08:58:56 -05:00
Silvio Moioli
35fcb8b52d Fix race condition on cache directory creation
os.makedirs() will raise OSError in case the directory passed as argument
already exists. We do check that this is not the case right before the
call, but there is still a tiny time window in which the directory might
be concurrently created between the isdir() check and the makedirs() call.

In some unlucky cases under heavy I/O the following stack trace is produced:

The minion function caused an exception: Traceback (most recent call last):
...
  File "/usr/lib/python2.7/site-packages/salt/fileclient.py", line 165, in cache_file
    return self.get_url(path, '', True, saltenv, cachedir=cachedir)
...
  File "/usr/lib/python2.7/site-packages/salt/fileclient.py", line 126, in _cache_loc
    os.makedirs(destdir)
  File "/usr/lib64/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: <PATH>
2017-04-06 09:26:09 +02:00
Erik Johnson
9da4eb18bf Check hash of cached source against source_hash before downloading archive
This will force a re-download if the hash specified by source_hash if it
doesn't match the hash of the cached file, but if the hash matches, it
will skip the download. This will permit keep=True to prevent repeated
downloads of the source file, if and only if the source_hash also
remains the same.
2017-04-05 23:19:41 -05:00
Erik Johnson
8c61f333ae Don't use __opts__.get() for hash_type
First of all, the opts will never not have this key, as it has a default
value in salt/config/__init__.py. Second, the default hash type changed
to sha256 anyway in 2016.11, so we shouldn't be referring to a specific
hash type when it'll no longer be accurate after a merge-forward.
2017-04-05 21:35:56 -05:00
Erik Johnson
0918311330 Don't mark files that already were deleted as errors
Also use six.iteritems()
2017-04-05 21:23:15 -05:00
Erik Johnson
51d88a16c8 Merge branch 'zer0def-fix-31363' into 2016.3 2017-04-05 21:20:30 -05:00
Erik Johnson
7f3cbd5cf9 Merge branch 'fix-31363' of https://github.com/zer0def/salt into zer0def-fix-31363 2017-04-05 21:20:10 -05:00
Erik Johnson
ad24faa59d Fix three issues in archive.extracted state
1. The trim_output argument was ignored for archives extracted using
   tarfile.

2. file.get_source_sum would fail if "source" is a list

3. The checksum was being updated before we checked to see if it
   matched, effectively keeping us from detecting changes to the hash.

4. When source_hash_update is True, and the archive is extracted, and
   files are later removed from the extraction dir, the state would not
   re-extract the archive unless the source_hash had changed.
2017-04-05 20:15:22 -05:00
Mike Place
cb9dcb1e1b Merge pull request #40543 from rallytime/fix-40005
Add the "fingerprint_hash_type" option to ssh state and module
2017-04-05 15:21:16 -06:00
Bo Maryniuk
aba94495a5 Lintfix (Py3 code compat) 2017-04-05 22:56:29 +02:00
Ch3LL
7710355e3a
check for salt install fail on vultur test 2017-04-05 14:39:31 -06:00
Ch3LL
aae3d14ea4
fix vultr cloud race condition to match on 0* 2017-04-05 14:05:49 -06:00
Nicole Thomas
3f0695575a Merge pull request #40540 from DSRCorporation/bugs/40494_merge_forward_cache_list_fix
A quick fix for Cache has no 'list' attribute.
2017-04-05 12:50:17 -06:00
Mike Place
28fc048030 Merge pull request #40464 from terminalmage/userdata-renderer
salt-cloud: Do not pass userdata_file through yaml renderer
2017-04-05 11:32:06 -06:00
Mike Place
cfba4cb422 Merge pull request #40534 from terminalmage/issue39892
Check master's ssh_minion_opts for fileserver/pillar values and ignore them
2017-04-05 10:59:57 -06:00
rallytime
1ef81e6a55 Add the "fingerprint_hash_type" option to ssh state and module
Fixes #40005

This new option allows the user to specify what kind of hash was
used when the public key was hashed to a fingerprint. The default
hash is md5, but the user should be able to specify this if they
know what the fingerprint was originally hashed with.
2017-04-05 10:58:58 -06:00
Nicole Thomas
990bde4c07 Merge pull request #40530 from dmurphy18/aix_docupd
Update release information for 2016.11.4 for additional AIX support
2017-04-05 10:20:22 -06:00
Dmitry Kuzmenko
c0fd5634cf A quick fix for Cache has no 'list' attribute. 2017-04-05 16:45:32 +03:00
Erik Johnson
ad88c58a09 Check master's ssh_minion_opts for fileserver/pillar values and ignore them
This prevents the ssh_minion_opts from overwriting values that should
have been inherited or otherwise setup by the master for the SSH minion.

Resolves #39892
2017-04-04 23:15:08 -05:00
Erik Johnson
84ee693006 Nova and openstack don't accept base64-encoded userdata
This fixes my bad copypasta.
2017-04-04 15:41:43 -05:00
Erik Johnson
73f4c43e2a Allow for userdata_template to be disabled in a cloud_profile
This handles the case where a global value has been set and it is
necessary to disable it for a single profile.
2017-04-04 15:41:43 -05:00
Erik Johnson
78b4798b1b Update compile_template test to use StringIO 2017-04-04 15:41:43 -05:00
Erik Johnson
5f7c5613ce Properly handle renderers which return StringIO objects 2017-04-04 15:41:43 -05:00
Erik Johnson
d551b0d857 Bring in salt.utils.stringio from develop branch 2017-04-04 15:41:43 -05:00
Erik Johnson
6a6ef0adf8 Move userdata templating to salt.utils.cloud 2017-04-04 15:41:43 -05:00
Erik Johnson
b440d0c679 Update 2016.11.4 release notes for userdata_renderer -> userdata_template 2017-04-04 15:41:43 -05:00
Erik Johnson
a6183d93d3 Preserve windows newlines in salt.template.compile_template()
Test included.
2017-04-04 15:41:43 -05:00
Erik Johnson
04f02df5fe Try to read compiled template as StringIO
The fact that PyYAML was the last renderer in the render pipe initially,
masked the fact that template renderers return StringIO instances and
not strings. This commit makes sure that we try reading from the
StringIO first and then fallback to just trying to base64 encode the
userdata value as returned by compile_template().
2017-04-04 15:41:43 -05:00
Erik Johnson
79cc253bbf Only template the userdata_file if explicitly configured to do so 2017-04-04 15:41:43 -05:00
Erik Johnson
b580654f85 Update cloud docs to reflect userdata_renderer -> userdata_template 2017-04-04 15:41:43 -05:00
Erik Johnson
a6064fb2e4 Rename userdata_renderer -> userdata_template in master config docs 2017-04-04 15:41:43 -05:00
Erik Johnson
50f2b2831f Remove userdata_renderer value 2017-04-04 15:41:43 -05:00
Erik Johnson
cc2186f35a Add templating support for other cloud drivers that support userdata_file 2017-04-04 15:41:43 -05:00
Erik Johnson
be8d34c59b ec2: Add support for using userdata_renderer to template userdata_file 2017-04-04 15:41:43 -05:00
Erik Johnson
eddbd41265 Openstack did not have templating support for userdata_file before 2016.11.4 2017-04-04 15:41:43 -05:00
Erik Johnson
a85a416c72 Add userdata_renderer fix info to 2016.11.4 release notes 2017-04-04 15:41:43 -05:00
Erik Johnson
111188742a Add documentation for userdata_renderer 2017-04-04 15:40:50 -05:00
Erik Johnson
9ee2dcfc2d Add userdata_renderer master config param 2017-04-04 15:40:50 -05:00
Mike Place
8da27c9e1d Merge pull request #40306 from terminalmage/issue40279
Don't use context caching for gathering systemd services
2017-04-04 14:36:38 -06:00
Mike Place
4d932691f1 Merge pull request #40528 from dmurphy18/salt_nightlybuild
Allow for nightly build designations in Salt versions
2017-04-04 14:34:25 -06:00
Mike Place
0ed385210f Merge pull request #40465 from rallytime/fix-37699
Artifactory Execution & State Module: Fixup Error Handling
2017-04-04 14:12:21 -06:00