Commit Graph

80905 Commits

Author SHA1 Message Date
Erik Johnson
8dfa51f31f Moar fixes for source_hash_update
This commit adds additional fixes make source_hash_update work as
expected.
2017-04-10 13:54:55 -05:00
Artur Kaszuba
3a0d61f108 Use correct exec_driver in dockerng.sls module
This change allow to execute dockerng.sls module with correct
docker exec_driver.
2017-04-10 15:55:48 +02:00
Christian McHugh
fc6cf53545 Ensure batch uses passed eauth token or credentials 2017-04-09 09:23:06 +01:00
Mike Place
4fa58be222 Merge pull request #40588 from rallytime/merge-2016.11
[2016.11] Merge forward from 2016.3 to 2016.11
2017-04-07 13:30:13 -06:00
rallytime
5a419b8aae Merge branch '2016.3' into '2016.11'
Conflicts:
  - salt/modules/pillar.py
2017-04-07 11:23:41 -06:00
Erik Johnson
7103707d49 Remove unnecessary versionadded lines
There's already one at the top of the function's docstring.
2017-04-07 10:42:39 -05:00
Nicole Thomas
3d07f637ca Merge pull request #40575 from rallytime/bp-40559
Back-port #40559 to 2016.11
2017-04-07 09:42:25 -06:00
Nicole Thomas
9041ca2ba5 Merge pull request #40576 from rallytime/bp-40573
Back-port #40573 to 2016.11
2017-04-07 09:20:10 -06:00
Erik Johnson
f8bc423ef9 Merge pull request #40563 from terminalmage/merge-2016.3-2016.11
Merge-forward 2016.3 -> 2016.11
2017-04-07 10:08:19 -05:00
Erik Johnson
0c608d7417 Add client_args_mock back to test
I removed this incorrectly in resolving a merge conflict.
2017-04-07 08:50:45 -05:00
Arda Kuyumcu
12180808ee Fix typo in IAM state for managed policies 2017-04-06 17:34:23 -06:00
jinm
8280e5256e Fix v3 for https://github.com/saltstack/salt/issues/38472 2017-04-06 17:33:09 -06:00
Mike Place
fd757fffa3 Merge pull request #40571 from terminalmage/issue39778
pkgrepo.managed: properly handle comments for debian
2017-04-06 15:55:45 -06:00
Mike Place
7fdeb9094d Merge pull request #40568 from rallytime/fix-40437
[salt-cloud] Don't use dict.keys()[x] in PY3 since dicts cannot be indexed
2017-04-06 15:54:53 -06:00
Mike Place
83f6d3d3bb Merge pull request #40567 from terminalmage/fix-pillar-get-merge-lists
Allow pillar.get to merge list as well as dictionaries
2017-04-06 15:54:16 -06:00
Mike Place
b1698e830e Merge pull request #40572 from rallytime/fix-40278
Clean out kwargs dict in cloud.action before calling cloud driver function
2017-04-06 15:53:39 -06:00
Mike Place
62d8ad2b4b Merge pull request #39882 from smarsching/issue-39842
Fix handling of trailing newlines on Windows
2017-04-06 15:12:24 -06:00
rallytime
c978486452 Clean out kwargs dict in cloud.action before calling cloud driver function
Fixes #40278

When we run a cloud.action function from the CLI, the various __pub_* keys
and values populate the "kwargs" arg. Then, when we attempt to call out
to a cloud driver's function that doesn't accept a "kwarg" arg (or there are
too many args passed now), we get an error.

If the cloud function only takes "name" and "call", we should not be passing
in "kwargs", too.
2017-04-06 14:29:03 -06:00
Erik Johnson
191610482d pkgrepo.managed: properly handle comments for debian
Resolves #39778.
2017-04-06 15:24:38 -05:00
Nicole Thomas
ae13de622a Merge pull request #40451 from isbm/isbm-fileclient-testcase-2016.11
Fileclient testcase (2016.11)
2017-04-06 13:53:30 -06:00
Mike Place
a8304cd5a1 Merge pull request #40552 from terminalmage/fix-hash-type-refs
Don't use __opts__.get() for hash_type
2017-04-06 12:27:31 -06:00
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
Nicole Thomas
03f0f4a8b3 Merge pull request #40561 from rallytime/merge-develop
[develop] Merge forward from 2016.11 to develop
2017-04-06 12:15:27 -06:00
rallytime
07b2dbeb48 [salt-cloud] Don't use dict.keys()[x] in PY3 since dicts cannot be indexed
Fixes #40437

Using 'dict.keys()' in Python 3 returns a view iterator instead of a list
like in Python 2. Therefore, we cannot get an indexed item from a dict.

We could wrap that up in a list, but this is slower and somewhat sloppy since
PY3 is trying to help us out and be efficient with dict views. We can get the
key name by using next(iter(dict)), which works both in python 2 and 3. The
order of getting the key names doesn't matter, as long as we get use them all.
2017-04-06 12:02:50 -06:00
Mike Place
56363bc41c Merge pull request #40462 from cachedout/state_expect_minions
Fix orch state when no minions return
2017-04-06 11:58:14 -06:00
Mike Place
74c65557dd Add space before in-lint comment for lint 2017-04-06 11:32:22 -06:00
Mike Place
84fd77797f Merge pull request #40512 from mtkennerly/add-shortcut-file-state
Add Windows shortcut support to salt.states.file
2017-04-06 11:30:07 -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
5f61928988 Merge pull request #40559 from jinm/develop
Fix v3 for https://github.com/saltstack/salt/issues/38472
2017-04-06 12:04:00 -05:00
Mike Place
60750a1619
Fix test 2017-04-06 10:48:27 -06: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
rallytime
9b04dec7ef Merge branch '2016.11' into 'develop'
No conflicts.
2017-04-06 09:18:36 -06: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
jinm
4ef3fa6722 Fix v3 for https://github.com/saltstack/salt/issues/38472 2017-04-06 10:42:30 -04: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
Pedro Algarvio
d8646f7122 Merge pull request #40550 from s0undt3ch/features/py3-pt2
Resource leakage fixes
2017-04-06 07:44:43 +01: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
mtkennerly
5184fe98d1 Fix pylint issues in file.shortcut. 2017-04-05 19:36:06 -04:00
Pedro Algarvio
29d4ce83ab
Py3 compat 2017-04-05 23:56:28 +01:00
Pedro Algarvio
2d32fab65b
Don't instantiate the log handler if unable to connect to server 2017-04-05 23:29:13 +01:00