Commit Graph

91191 Commits

Author SHA1 Message Date
Ch3LL
9fef8bc431
Mirror libnacl imports in test from the nacl runner 2018-03-21 15:18:58 -04:00
Ch3LL
f11d58a8e9
Mirror libnacl imports in test from the nacl module 2018-03-21 15:10:46 -04:00
Nicole Thomas
8cdd56b9dc
Merge pull request #46620 from rallytime/merge-2018.3.0rc1-into-2018.3
[2018.3] Merge 2018.3.0rc1 into 2018.3
2018-03-20 18:45:00 -04:00
rallytime
b03cda3cea
Merge branch '2018.3.0rc1' into '2018.3'
No conflicts.
2018-03-20 09:13:13 -04:00
Nicole Thomas
e1ade5dbb2
Merge pull request #46597 from terminalmage/fix-divergent-mongodb-states
Revert PR 41278
2018-03-19 22:02:37 -04:00
Nicole Thomas
b361bc93e8
Merge pull request #46608 from garethgreenaway/46593_schedule_present_always_triggers_change
[2018.3.0rc1] fixes to scheduler
2018-03-19 22:01:50 -04:00
Nicole Thomas
2d2fe22ae2
Merge pull request #46606 from Ch3LL/infoblox_docs
add autodoc topics for infoblox state modules
2018-03-19 17:35:46 -04:00
Nicole Thomas
36a64ab2d8
Lint: Remove extra blank line 2018-03-19 17:03:25 -04:00
Erik Johnson
db304c3eff
Update tests to reflect changes to state returns 2018-03-19 15:18:49 -05:00
Erik Johnson
c4712135a6
Revert PR 41278
This PR should not have been merged, as there are very good reasons for
keeping the mongodb_database and mongodb_user state modules separate.
Additionally, role management was already supported at the time the PR
was merged.

Since this PR has not been in an official release of Salt, I'm reverting
it now to prevent any confusion.
2018-03-19 15:18:49 -05:00
Nicole Thomas
1b7272ff55
Merge pull request #46530 from twangboy/optional_grains
Make iSCSI and Fibre Channel grains optional
2018-03-19 14:02:14 -04:00
Gareth J. Greenaway
da9a9b6e37
Fixing a bug that would result in constant changes using the schedule state module when a job was added with run_on_start. Adding an eval test to test run_on_start functionality. 2018-03-19 09:23:22 -07:00
Ch3LL
6eab6a7dc4
add autodoc topics for infoblox state modules 2018-03-19 11:06:37 -04:00
Nicole Thomas
74d12cf4d6
Merge branch '2018.3.0rc1' into optional_grains 2018-03-19 10:03:37 -04:00
Nicole Thomas
20ed81f009
Fix typo 2018-03-19 08:00:15 -04:00
Nicole Thomas
93ab582230
Small grammar fix to new grains settings 2018-03-19 07:59:41 -04:00
Nicole Thomas
d2516b251f
Merge pull request #46589 from Ch3LL/mac_user
Preserve tuples when decoding grain data in loader
2018-03-19 07:44:08 -04:00
Nicole Thomas
e7dc802e2c
Merge branch '2018.3.0rc1' into optional_grains 2018-03-19 07:39:02 -04:00
Ch3LL
771e21e28b
Preserve tuples when decoding grain data in loader 2018-03-16 18:58:45 -04:00
twangboy
352eae3ffe
Add configuration options to docs and release notes
Remove __proxyenabled__ from the two new grains files.
2018-03-16 13:27:12 -06:00
Nicole Thomas
218b7f7a08
Merge pull request #46401 from garethgreenaway/46335_unicode_broke_the_x509_star
[2018.3.0rc1] fixes to x509 module
2018-03-16 13:57:53 -04:00
twangboy
50a860b839
Remove unicode things 2018-03-15 12:55:26 -06:00
twangboy
8474006dab
Fix 2 tests
Modifies the fibre_channel.py grain for linux to allow mocking. You
can't mock a file handle used in a for loop.
Fixes the mocking in test_windows_iscsi_iqn_grains. Apparently, you
can't stack multiple mocks in the same with statement.
2018-03-15 11:15:57 -06:00
Nicole Thomas
1191d5b379
Merge pull request #46540 from s0undt3ch/2018.3
Some missing `isinstance` checks.
2018-03-15 12:17:19 -04:00
Nicole Thomas
5429438e4b
Merge pull request #46513 from rallytime/merge-2018.3
[2018.3] Merge forward from 2018.3.0rc1 to 2018.3
2018-03-15 11:58:59 -04:00
twangboy
5636ab7cd4
Fix some lint 2018-03-14 16:39:40 -06:00
twangboy
16949c0b93
Fix failing tests, add new tests 2018-03-14 16:37:42 -06:00
Pedro Algarvio
fa1d668774
Some missing isinstance checks. Committed again through a PR. 2018-03-14 15:59:36 +00:00
Pedro Algarvio
78c0b77afd
Revert "Some missing isinstance checks". Pushed directly.
This reverts commit 2a7dd73710.
2018-03-14 14:01:22 +00:00
Pedro Algarvio
2a7dd73710
Some missing isinstance checks 2018-03-14 13:57:35 +00:00
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
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
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
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
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
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
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
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