Commit Graph

90475 Commits

Author SHA1 Message Date
Dmitry Kuzmenko
5a3316ea20
Workaroung python bug in traceback.format_exc()
The function raises an AttributeError if there is no current exception.
https://bugs.python.org/issue23003
2018-02-14 16:16:57 +03:00
Nicole Thomas
e7999e260d
Merge pull request #44892 from terminalmage/yamlloader
Force Salt's YAML loader to load all strings as unicode types
2018-02-13 17:00:37 -05:00
Nicole Thomas
d72cf1dd6f
Merge pull request #45997 from garethgreenaway/2557_schedule_fixes_once
[oxygen.rc1] scheduler once fixes
2018-02-13 11:18:06 -05:00
Nicole Thomas
280bd8d862
Merge pull request #45990 from gtmanfred/rootdir
fix rootdir prepending on windows
2018-02-13 08:59:44 -05:00
Nicole Thomas
175c8be882
Merge pull request #45999 from terminalmage/issue45960
Properly handle undecodable bytestrings in nested outputter
2018-02-13 08:43:56 -05:00
Erik Johnson
6cb1a38407
Properly handle undecodable bytestrings in nested outputter
Note however that these bytestrings will typically end up being
whitespace when printed. But, at least they will no longer result in a
traceback.
2018-02-12 22:35:45 -06:00
Gareth J. Greenaway
b752775c44
A couple bug fixes in the scheduler when once is used for the job run time. 2018-02-12 20:21:16 -08:00
Daniel Wallace
9e98f9dcdb
fix rootdir prepending on windows 2018-02-12 15:36:27 -07:00
Gareth J. Greenaway
d17cb93b27
Merge pull request #45989 from rallytime/bp-45984
Back-port #45984 to oxygen.rc1
2018-02-12 14:27:45 -08:00
Gareth J. Greenaway
a8c2cd8066
Missing format in the call to write. 2018-02-12 17:26:10 -05:00
Nicole Thomas
ff6a8d6df9
Merge pull request #45937 from twangboy/win_fix_pkg_unicode
Fix Py2 unicode issue in win_pkg.py
2018-02-12 15:21:14 -05:00
Nicole Thomas
869036ee2e
Merge pull request #45957 from rallytime/boto-cfn-six-import
Add missing six import in boto_cfn module
2018-02-12 11:29:09 -05:00
Nicole Thomas
bc13ff8b48
Merge pull request #45941 from terminalmage/issue45679
Fix incorrect translation of docker port_bindings -> ports
2018-02-12 11:28:36 -05:00
Nicole Thomas
d3a8f06911
Merge pull request #45927 from rallytime/utils-paths
Update old utils path to new path for which() function
2018-02-09 17:30:51 -05:00
Nicole Thomas
c0e01cea05
Merge pull request #45950 from rallytime/bp-45902
Back-port #45902 to oxygen.rc1
2018-02-09 17:30:17 -05:00
Nicole Thomas
977953cf9f
Merge pull request #45952 from rallytime/bp-45928
Back-port #45928 to oxygen.rc1
2018-02-09 17:28:54 -05:00
Nicole Thomas
c510498df2
Merge pull request #45951 from rallytime/bp-45742
Back-port #45742 to oxygen.rc1
2018-02-09 17:28:33 -05:00
Nicole Thomas
570bbc9cd7
Merge pull request #45931 from gtmanfred/publisher
Fix publisher_acl for oxygen
2018-02-09 15:52:49 -05:00
rallytime
5adcb6e3b2
Add missing six import in boto_cfn module
Since pylint was disabled for this file, the lint check must have
missed that the six import was missing.

I also updated the CLI Example formatting to match our doc boxes.
2018-02-09 15:19:15 -05:00
Erik Johnson
29d0271b73
Don't try to sort ports when translating docker input
This sorting was done mainly for the benefit of the test suite, but
Python 3 will raise an error when you try to sort a mixture of int and
tuple types, so sorting breaks down when there are UDP ports.

Instead, this just leaves them as an unsorted list when passed to the
API, and the test suite does the sorting before the assertEqual.
2018-02-09 11:14:03 -06:00
Gareth J. Greenaway
cda805fc3b
Fixing vault when used with pillar over salt-ssh 2018-02-09 11:44:51 -05:00
Marc Vieira-Cardinal (VA2MVC)
3a2f1040f4
Removed the chained copy 2018-02-09 11:42:32 -05:00
Marc Vieira-Cardinal (VA2MVC)
65fa24aa26
list.copy() is not compatible with python 2.7
I doubt that a .copy() is required there since list() would already create one but since the previous committer added it I am improving by replacing the .copy() with a [:] which makes a copy in python 2.7 and 3+
2018-02-09 11:42:27 -05:00
Erik Johnson
0ff41c5835
Add regression test for issue 45893 2018-02-09 11:40:22 -05:00
Erik Johnson
4f522eee2f
Remove duplicated section in docstring and fix example 2018-02-09 11:40:22 -05:00
Erik Johnson
dd378bba9b
Check the effective saltenv for cached archive
This fixes a regression caused by using a saltenv other than `base`.
2018-02-09 11:39:54 -05:00
rallytime
e04e7bdfc9
Remove extra patch 2018-02-09 09:40:22 -05:00
Nicole Thomas
e64764499a
Merge pull request #45936 from garethgreenaway/fixing_mactests_queue_full
[oxygen] Fix to log/handlers/__init__.py
2018-02-09 07:17:18 -05:00
Nicole Thomas
f4acb18d4b
Merge pull request #45912 from gtmanfred/vmware
add test to verify vmware clusters can be used in vmware cloud
2018-02-09 07:15:51 -05:00
Erik Johnson
f35d9f6fef
Fix incorrect translation of docker port_bindings -> ports
The logic which ensures that we expose ports which are being bound,
even when not explicitly configured, was done incorrectly. UDP ports
were being passed to the API as '1234/udp' instead of (1234, 'udp').
This results in the port not being exposed properly.

The logic has been corrected. Additionally both the "ports" input
translation function, as well as the post-processing code (where the
port numbers configured in port_bindings were being added) both
contained code to "fix" any ports which were configured using
'portnum/tcp', as these must be passed to the API simply as integers. To
reduce code duplication, this normalization is now only performed at the
very end of the post-processing function, after ports have been
translated, and any missing ports from the port_bindings have been
added.

The unit test for the port_bindings input translation code, which was
written based upon the same incorrect reading of the API docs that
resulted in the incorrect behavior, have been updated to confirm the
(now) correct behavior. The unit test for the ports input translation
code has been updated to reflect the new normalization behavior.

Finally, an integration test has been added to ensure that we properly
expose UDP ports which are added as part of the post-processing
function.
2018-02-08 23:22:43 -06:00
Erik Johnson
15a1ab4acc
Roll back exception logging
There are a lot of legit API errors such as 404 errors when inspecting
something that doesn't exist. We don't want these to all log exceptions.
2018-02-08 23:22:43 -06:00
Gareth J. Greenaway
2aa4483784
Adding an import for salt.ext.six.moves to import queue to use in the exception for when the multiprocessing queue is full. 2018-02-08 14:54:29 -08:00
twangboy
f5e56b9b29
Fix Py2 unicode issue in win_pkg.py
`salt.utils.templates`
Fixes an issue where the template renderer was doing some unnecessary encoding
Also ensures utf-8 encoding when writing the file

`salt.modules.win_pkg`
Fixes an issue the winrepo.p file was being decoded with the system
decoding. This makes sure it's using utf-8
Removes the need to decode the names since they're already in utf-8
format
2018-02-08 15:48:37 -07:00
Nicole Thomas
a356a31ab4
Merge pull request #45929 from sdodsley/purefa_doc_fix
Documentation fix for snap_eradicate function in purefa module
2018-02-08 17:36:09 -05:00
Daniel Wallace
26b532300e
Revert "Handle deprecation path for pki_dir in verify_env util"
This reverts commit d50b7e0062.
2018-02-08 13:05:49 -07:00
Simon Dodsley
c2f681a9c2 Fix documentation in snap_eradicate function (purefa module) 2018-02-08 14:58:40 -05:00
Daniel Wallace
dc91055059
Revert "Separates key_dir from cache_dir, The key files (i.e. '.root_key', '.sudo_...') must not be shared with other masters."
This reverts commit 20bf4eed1d.

This change breaks publisher_acls.

1) The key_dir's permissions are controlled by `permissive_pki_access` which is
   not required by publisher_acls.  By default, it is also changed back to 700
   each time that the salt-master restarts, so it will have to be chmodded each
   time.
2) The default directory for these keys is changed, which will break a lot of
   users publisher_acls setups on an upgrade to Oxygen, and require them to go
   back in to chmod new directories.

I was going through and switching out the key dir to default back to
/var/cache/salt/master, and allow it to be changed, and also be able to specify
that it is a sensitive dir, but once I ran across the `permissive_pki_access`
stuff, I thought it was better to just revert this change and try again against
Fluorine, since we do not have a lot of tests in this area around publisher_acl.
2018-02-08 12:55:25 -07:00
Daniel Wallace
9edc0baf0c
dont touch log_file if log_level is quiet 2018-02-08 12:55:25 -07:00
rallytime
a16ea53430
Update old utils path to new path for which() function 2018-02-08 14:38:25 -05:00
Nicole Thomas
61d86588b2
Merge pull request #45918 from DSRCorporation/bugs/windows_unicode
Windows unicode related bugfix
2018-02-08 13:45:37 -05:00
Daniel Wallace
3e093ba022
fix pylint 2018-02-08 09:37:11 -07:00
Erik Johnson
3f42a58363
Force Salt's YAML loader to load all strings as unicode types
This reduces the likelihood that non-unicode strings make their way into
Salt and cause str/unicode mismatches resulting in UnicodeDecodeErrors.
2018-02-08 09:04:49 -06:00
Dmitry Kuzmenko
6260cddb11
Don't use unicode for WinDLL and ctypes.LoadLibrary on Windows 2018-02-08 17:40:00 +03:00
Nicole Thomas
c88352a26f
Merge pull request #45844 from garethgreenaway/track_scheduled_next_time_skipped_jobs
[oxygen] Track the next scheduled fire time and when jobs are skipped.
2018-02-08 09:12:23 -05:00
Nicole Thomas
7e0cd38066
Merge pull request #45892 from terminalmage/issue45473
Add unit tests for gitfs features new to Oxygen
2018-02-08 08:50:10 -05:00
Nicole Thomas
5fdd8dff76
Merge pull request #45909 from gtmanfred/cloud
fix digitalocean tests
2018-02-08 08:21:47 -05:00
Daniel Wallace
56c5a333cd
add test to verify clusters
This test just double checks that the get_mor_containers is called twice when
trying to use a Cluster, and once if a datastore is specified.
2018-02-07 17:03:13 -07:00
Daniel Wallace
e892f75660
fix digital ocean tests 2018-02-07 14:04:37 -07:00
Erik Johnson
a0586748b6
Remove unused imports 2018-02-07 14:44:15 -06:00
Gareth J. Greenaway
09d960c0cb
Updating utils/schedule.py to be able to track when jobs are skipped because of the max_running parameter. This change moves that check out of handle_func and moves it to it's own function. Also updated skip tests to include a test that _skip_reason is included in the results when a job is skipped. 2018-02-07 11:39:10 -08:00