Commit Graph

90462 Commits

Author SHA1 Message Date
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
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
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
Gareth J. Greenaway
b23e5a7db2
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:09 -08:00
Gareth J. Greenaway
9bd94e0d17
Track the next scheduled fire time and when jobs are skipped. 2018-02-07 11:39:09 -08:00
Nicole Thomas
a309933104
Merge pull request #45885 from terminalmage/issue45845
Catch and report YAML errors in jinja load_yaml
2018-02-07 14:08:48 -05:00
Erik Johnson
fb05654b71
Add unit tests for new Oxygen gitfs features
Also expand unit tests to test both GitPython and pygit2
2018-02-07 12:00:44 -06:00
Erik Johnson
a0f7eec7e5
Work around upstream pygit2 bug affecting unicode refs
This adds a workaround for a bug fixed upstream on 2 Feb 2018, which
caused a branch or tag containing a unicode character to raise a
UnicodeDecodeError. Additionally, it changes how we handle version
analysis in salt.utils.gitfs. We should be using the LooseVersion from
salt.utils.versions instead of distutils.version.
2018-02-07 12:00:44 -06:00
Nicole Thomas
ec590aff87
Merge pull request #45834 from terminalmage/cmdmod-unicode-compat
2 unicode-compatibility fixes for cmdmod.py
2018-02-07 09:51:14 -05:00
Nicole Thomas
2c14201d4f
Merge pull request #45888 from gtmanfred/cloud
Fix cloud tests
2018-02-07 09:15:20 -05:00
Erik Johnson
b45f5720db
Move exception catch
This was caught by pylint. Adding the TemplateRuntimeError should have
been done below UndefinedError because UndefinedError is a child class
of the TemplateRuntimeError.
2018-02-07 02:09:57 -06:00
Erik Johnson
fa72e16575
Catch YAML errors when executing a load_yaml from jinja
Use the context information from these exceptions to provide a
meaningful error message.
2018-02-07 02:09:57 -06:00
Erik Johnson
3688ae0440
Properly raise ConstructorError in construct_mapping
We were passing the wrong arguments to this exception's constructor.
This commit changes the exceptions so that they end up with the proper
attributes, allowing them to be successfully interpreted when caught.
2018-02-07 02:09:56 -06:00
Erik Johnson
b4e24a69e6
Move get_context to salt.utils.stringutils
This avoids circular dependencies when salt.utils.jinja (which is
imported by salt.utils.templates) needs to use get_context()
2018-02-07 02:09:56 -06:00
Erik Johnson
c5c03f4c3e
Add link to test.versions_report 2018-02-07 02:01:55 -06:00
Erik Johnson
22c676ce57
Add option to cmdmod funcs to specify the output encoding 2018-02-07 02:01:55 -06:00