Commit Graph

91289 Commits

Author SHA1 Message Date
twangboy
d3335b78eb
Make iSCSI and Fibre Channel grains optional
Creates iscsi.py and fibre_channel.py
Gates the grains with options from the config file:
- fibre_channel_grains
- iscsi_grains
2018-03-13 17:12:16 -06:00
Daniel Wallace
083846fe0e
Merge pull request #46529 from gtmanfred/kitchen
retry if there is a segfault
2018-03-13 16:41:53 -06:00
Daniel Wallace
50d6e2c7be
retry if there is a segfault 2018-03-13 16:40:35 -06:00
Nicole Thomas
1e71055965
Merge pull request #46477 from terminalmage/salt-ssh-unicode-grains
salt-ssh: fix JSON load of return data when it contains non-ascii
2018-03-13 17:36:16 -04:00
Erik Johnson
a8b1f0d640
Add unit test for salt-ssh edge case 2018-03-13 13:39:27 -05:00
Nicole Thomas
5cc11129f1
Merge pull request #46511 from rallytime/bp-45769
Back-port #45769 to 2017.7
2018-03-13 13:08:51 -04:00
Gareth J. Greenaway
65fbf4ea88
Merge pull request #46517 from garethgreenaway/46514_clarify_require_any_documentation
[2018.3.0rc1] Clarifying the documentation for the new require_any requisite.
2018-03-13 10:00:41 -07:00
Gareth J. Greenaway
f721218166
Claryfing the documentation for the new require_any requisite. 2018-03-13 09:28:14 -07:00
Erik Johnson
3cd371efe6
Add with_tempfile helper from f9f187e
This helper was part of a PR that did not get ported into the 2018.3.0rc1
branch, but to help with code re-use this commit adds the helper to
2018.3.0rc1.
2018-03-13 10:41:55 -05:00
rallytime
aa760334a1
Merge branch '2018.3.0rc1' into '2018.3'
No conflicts.
2018-03-13 10:58:28 -04:00
Erik Johnson
096bcb3ca9
salt-ssh: fix JSON load of return data when it contains non-ascii
For reasons I can't explain, in `salt.utils.json.find_json()` using
`.splitlines()` will sometimes convert a unicode string into a list of
str types on Python 2. So, that's weird. This can be triggered in
salt-ssh whenever there are non-ascii chars in the return data.

[DEBUG] raw = u'{"local": {"return": {"foo": "\xf6\xe4\xfc"}}}'
[DEBUG] raw.splitlines() = ['{"local": {"return": {"foo": "\xc3\xb6\xc3\xa4\xc3\xbc"}}}']

To resolve this, the UnicodeDecodeError is caught and reattempted with a
decoded list.

Additionally, this fixes a performance oversight. We process the string
one line at a time but we are iterating a number of times equal to the
length of the string. This means that we will nearly always end up doing
a bunch of extra list slices resulting in empty lists, which when joined
and loaded will produce ValueErrors, which we are catching and ignoring.
By enumerating over the split string, we ensure that we only iterate at
most a number of times equal to the amount of lines in the string.
2018-03-13 09:50:19 -05:00
Stefan Reimer
a8ffceda53
Surpress boto WARNING during decode, reference: https://github.com/boto/boto/issues/2965 2018-03-13 10:36:43 -04:00
Nicole Thomas
0285875edc
Merge pull request #46501 from twangboy/win_fix_grains
Remove ConvertTo-JSON on Win 7 / 2008R2 and lower
2018-03-13 10:33:39 -04:00
Nicole Thomas
3e073c7e8a
Merge pull request #46502 from terminalmage/issue43208
user.present: don't change uid/gid unless explicitly told to
2018-03-13 10:25:19 -04:00
Erik Johnson
4106840deb
user.present: don't change uid/gid unless explicitly told to
Prior to this change, this state would update the uid/gid. This change
may have been accidental, and can cause problems with file ownership. A
uid/gid change must now be explicitly requested via two new arguments to
the `user.present` state.
2018-03-12 19:30:47 -05:00
twangboy
16f7d44aae
Remove ConvertTo-JSON on Win 7 / 2008R2 and lower 2018-03-12 17:50:03 -06:00
Nicole Thomas
c83e539d9d
Merge pull request #46497 from terminalmage/issue46207-2018.3.0rc1
salt-call: don't re-use initial pillar if CLI overrides passed (2018.3.0rc1)
2018-03-12 17:27:12 -04:00
Nicole Thomas
0e90c8ca6f
Merge pull request #46493 from terminalmage/issue46207
salt-call: don't re-use initial pillar if CLI overrides passed
2018-03-12 16:41:51 -04:00
Nicole Thomas
7cdb00ca9c
Merge pull request #46398 from rallytime/merge-2018.3
[2018.3] Merge forward from 2017.7 to 2018.3
2018-03-12 16:25:18 -04:00
Nicole Thomas
b11a8fc8e0
Merge pull request #46450 from gtmanfred/salt_runner
load grains for salt.cmd runner
2018-03-12 14:52:22 -04:00
Nicole Thomas
22d753364b
Merge pull request #46337 from gtmanfred/2017.7
Fix using names with listen and listen_in
2018-03-12 14:49:59 -04:00
Nicole Thomas
b7191b8782
Merge pull request #46413 from meaksh/2017.7-explore-result-in-depth
Explore 'module.run' state module output in depth to catch "result" properly
2018-03-12 14:49:06 -04:00
Daniel Wallace
02a79a2014
Merge pull request #46496 from gtmanfred/kitchen
more test kitchen clean up
2018-03-12 12:28:33 -06:00
Erik Johnson
8eb721db44
salt-call: don't re-use initial pillar if CLI overrides passed
A salt-call run already compiles pillar before executing the specified
function. Therefore, a performance improvement was made to re-use that
initial pillar data when running states. However, when we just re-use
that pillar data, we lose the ability to have custom external pillar
modules gain access to CLI pillar overrides. Therefore, this commit
changes the code in the state compiler which gathers/re-uses the pillar
data so that it only re-uses the existing in-memory pillar data when no
CLI pillar overrides were passed.
2018-03-12 13:26:13 -05:00
Daniel Wallace
da002f78d0
include virtualenv path for py3 windows 2018-03-12 12:24:51 -06:00
Daniel Wallace
fe2efe03ea
remove duplicate setup 2018-03-12 11:14:33 -06:00
Nicole Thomas
5c4c182d75
Merge pull request #46330 from bdrung/fix_kubernetes_test_create_deployments
Fix ValueError for template in AppsV1beta1DeploymentSpec
2018-03-12 12:56:17 -04:00
Erik Johnson
f06ff68f10
salt-call: don't re-use initial pillar if CLI overrides passed
A salt-call run already compiles pillar before executing the specified
function. Therefore, a performance improvement was made to re-use that
initial pillar data when running states. However, when we just re-use
that pillar data, we lose the ability to have custom external pillar
modules gain access to CLI pillar overrides. Therefore, this commit
changes the code in the state compiler which gathers/re-uses the pillar
data so that it only re-uses the existing in-memory pillar data when no
CLI pillar overrides were passed.
2018-03-12 11:36:08 -05:00
Nicole Thomas
c7e05d3ff4
Merge pull request #46482 from rongshengfang/fix-keyerror-in-instance_present
Fix KeyError in salt/states/boto_ec2.py
2018-03-12 11:13:12 -04:00
Gareth J. Greenaway
08fce29653
Silly typo in test. 2018-03-10 06:23:00 -08:00
Gareth J. Greenaway
84d720b14c
Adding some code that was accidently reverted back in. 2018-03-10 06:21:47 -08:00
Rongsheng Fang
ed8c83e89a Fix KeyError in salt/states/boto_ec2.py when an EIP is being associated to an
existing instance with the instance_present state.

Fixes #46479.
2018-03-10 09:19:37 -05:00
Gareth J. Greenaway
2c43911f62
Fixing lint. 2018-03-10 06:01:01 -08:00
Gareth J. Greenaway
e813b74fbe
Update test_x509.py
Lint fixes.
2018-03-10 06:01:00 -08:00
Gareth J. Greenaway
53b462241c
Swapping to_str for to_bytes. 2018-03-10 06:01:00 -08:00
Gareth J. Greenaway
1d57787a6f
Gating the two tests that require m2crypto to be available. 2018-03-10 06:01:00 -08:00
Gareth J. Greenaway
70aca0da57
Recent unicode changes into Oxygen broke some aspects of the x509 module. When processing PEM text, it needs to be treated as ascii not unicode. Adding a couple tests for affected functions. 2018-03-10 06:01:00 -08:00
Nicole Thomas
573d51afec
Merge pull request #46463 from terminalmage/mock-2.0
Update requirements files to depend on mock>=2.0.0
2018-03-09 14:24:40 -05:00
Nicole Thomas
a154d35fc7
Merge pull request #46422 from rallytime/bp-46300
Back-port #46300 to 2017.7
2018-03-09 14:19:24 -05:00
Nicole Thomas
158d8028d5
Merge pull request #46426 from garethgreenaway/46334_fixes_nacl_module_runner
[2018.3.0rc1] fixes to nacl module & runner
2018-03-09 14:17:19 -05:00
Dmitry Kuzmenko
d22e5ba442
Merge fix: return back wb+ mode in crypt.gen_keys. 2018-03-09 21:35:48 +03:00
Nicole Thomas
2afaca17a1
Merge pull request #46320 from mcalmer/warn-kubernetes
add warning about future config option change
2018-03-09 12:48:28 -05:00
Nicole Thomas
c7f95581e3
Merge pull request #46449 from bdrung/make-doc-theme-configurable
Make documentation theme configurable
2018-03-09 12:47:14 -05:00
Nicole Thomas
10ce0e9e20
Merge pull request #46162 from rallytime/team-suse-zypper-owner
Add team-suse to CODEOWNERS file for zypper files
2018-03-09 12:46:13 -05:00
Nicole Thomas
cac096b311
Merge pull request #46434 from gtmanfred/highstate_return
split return key value correctly
2018-03-09 12:45:20 -05:00
Nicole Thomas
7dd71101ce
Merge pull request #46455 from whytewolf/Issue_44452_unicode_cloud
.format remove fix for #44452
2018-03-09 12:37:18 -05:00
Erik Johnson
b958b4699c
Update requirements files to depend on mock>=2.0.0
This requirement was changed in salt-jenkins but never done here.
2018-03-09 11:16:13 -06:00
Nicole Thomas
9c089aa4de
Merge pull request #46421 from bdrung/skip-ssh-tests-if-ssh-is-missing
Skip SSHPasswordTests if ssh binary is not found
2018-03-09 11:21:01 -05:00
Daniel Wallace
7974ff7264
load grains for salt.cmd runner
Without this, none of the modules like pkg.install or service.restart can be
used because there are no grains for the __virtual__ function to check.
2018-03-09 08:24:36 -07:00
Daniel Wallace
d18f1a55a7
fix pylint 2018-03-09 08:23:17 -07:00