Commit Graph

85177 Commits

Author SHA1 Message Date
Benjamin Drung
a92ec0db1b Make _parse_os_release() always callable
To simplify running unit tests against os_data(), make the
_parse_os_release() function always callable to avoid needing to mock
os.path.isfile().

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Benjamin Drung
eee1fe5b38 tests: Dissolve _run_ubuntu_os_grains_tests
_run_ubuntu_os_grains_tests is only used once and does not provide any
useful abstraction since the introduction of _run_os_grains_tests.

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Benjamin Drung
1d6ef731fe tests: Deduplicate _run_os_grains_tests()
_run_suse_os_grains_tests() and _run_ubuntu_os_grains_tests() share most
of their logic. Combine the common part in _run_os_grains_tests() and
let the remaining small parts live in their origin functions.

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Nicole Thomas
705caa8cca
Merge pull request #46148 from rallytime/merge-2017.7
[2017.7] Merge forward from 2017.7.3 to 2017.7
2018-02-23 14:21:38 -05:00
Nicole Thomas
10a47dcbc4
Merge pull request #46137 from damon-atkins/2017.7_fix_ec2_pillar2
[2017.7] update ec2 pillar arguments with better names
2018-02-23 08:32:04 -05:00
Nicole Thomas
d74cb14557
Merge pull request #46145 from terminalmage/issue46004
3 small fixes for runners/orchestration
2018-02-22 17:11:10 -05:00
Erik Johnson
467ff841cd
pillarenv argument should default to None and not the value from opts 2018-02-22 10:01:40 -06:00
rallytime
25deebf7a6
Merge branch '2017.7.3' into '2017.7'
Conflicts:
  - salt/modules/git.py
2018-02-22 10:22:22 -05:00
Erik Johnson
2a185855ea
Better solution for fixing the opts munging in pillar.show_pillar runner
The pillarenv argument to the `Pillar` class is only used as an override
of what is in the opts. Therefore, it should default to None unless
passed in the kwargs.

This also removes the need for a deepcopy of the opts, since we're no
longer making changes to the opts before passing them to the `Pillar`
constructor.
2018-02-22 09:19:41 -06:00
Nicole Thomas
0398ce0482
Merge pull request #46135 from rallytime/bp-46088
Back-port #46088 to 2017.7
2018-02-22 10:11:13 -05:00
Erik Johnson
e2c4702e0c
Update tests to reflect changes to the SaltCacheLoader 2018-02-21 23:20:02 -06:00
Erik Johnson
f9301fcc34
Document behavior when orchestration runnner invoked with non-orch states
This also replaces some += usage with list.extend for a modest
performance/memory improvement.
2018-02-21 20:36:30 -06:00
Erik Johnson
9644579cd0
Instantiate the SaltCacheLoader's fileclient in the __init__
This fixes an edge case when orchestration attempts to compile pillar
data before making any other fileclient requests.
2018-02-21 20:36:30 -06:00
Erik Johnson
f9a6c86e21
salt.runners.pillar.show_pillar: don't modify master opts
This keeps us from modifying the master opts when compiling pillar data
in this runner.
2018-02-21 20:36:29 -06:00
Erik Johnson
e0940a9fc4
Properly detect use of the state.orch alias and add orch jid to kwargs
Before, only when `salt-run state.orchestrate` was used would we add the
orch jid to the kwargs.
2018-02-21 20:36:29 -06:00
Nicole Thomas
1fcbbd1e02
Merge pull request #46136 from rallytime/bp-46115
Back-port #46115 to 2017.7
2018-02-21 14:17:22 -05:00
Nicole Thomas
11e5e8eb86
Merge pull request #45911 from twangboy/win_fix_lgpo_unicode
LGPO Module: Convert reg values to unicode for debug
2018-02-21 14:02:16 -05:00
Nicole Thomas
524a6a72a0
Merge pull request #46123 from gtmanfred/2017.7
If no pubkey is passed in openmode fail
2018-02-21 14:01:46 -05:00
twangboy
bcde5cc625
Update log statement 2018-02-21 09:47:54 -07:00
twangboy
e9fa53d3b7
Change the Invalid Data Message 2018-02-21 09:47:53 -07:00
twangboy
c818d4b791
Convert reg values to unicode for debug 2018-02-21 09:47:52 -07:00
Nicole Thomas
e48fa58012
Merge pull request #46131 from vutny/doc-formula-formatting
[DOC] Fix code-blocks for reStructuredText
2018-02-21 10:47:05 -05:00
Daniel Wallace
8d36730ef7
If no pubkey is passed in openmode fail
If the pub entry in the load is empty, we should fail authentication in open
mode.  This is usually caught elsewhere for the other modes, because we would
just write it to a file, but in this case, we only write it to a file if it
actually exists, and if it is different from disk_key, so we would catch all
other options when trying to load the public key.

Fixes #46085
2018-02-21 08:38:30 -07:00
Volodymyr Samodid
0a481d707f
update digitalocean salt-cloud driver
fix #45837
2018-02-21 10:33:29 -05:00
Damon Atkins
99e7f6a7d3 update ec2 pillar arguments with better names 2018-02-22 02:25:36 +11:00
zr
57a60f62a3
fix kernel subpackages install bug 2018-02-21 10:25:12 -05:00
Nicole Thomas
6cea44ee95
Merge pull request #46118 from rallytime/bp-44603
Back-port #44603 to 2017.7
2018-02-21 10:21:41 -05:00
Denys Havrysh
d8fb051e44
[DOC] Fix code-blocks for reStructuredText 2018-02-21 15:37:57 +02:00
Nicole Thomas
16c382b55b
Merge pull request #46121 from rallytime/merge-2017.7
[2017.7] Merge forward from 2016.11 to 2017.7
2018-02-21 05:07:17 -05:00
Nicole Thomas
b92346645b
Merge pull request #46107 from amendlik/yumpkg-assumeyes
Add --assumeyes on YUM/DNF commands
2018-02-20 17:52:05 -05:00
rallytime
4c2f504a85
Merge branch '2016.11' into '2017.7'
No conflicts.
2018-02-20 17:43:33 -05:00
Ollie Armstrong
2a2c23c66b
Fix acme state to correctly return on test
Previously, the acme.cert state would return that a change was pending
during a test run even in the case that the certificate would not have
been touched.

Changed the return value in this case so that it is not thought to
require a change.

This is reported in #40208 [0] and is also referenced in #42763 [1].
The issue #40208 looks to go on to recommend further changes beyond the
scope of this 'quick fix'.

[0] https://github.com/saltstack/salt/issues/40208#issuecomment-289637588
[1] https://github.com/saltstack/salt/issues/42763#issuecomment-345728031
2018-02-20 16:50:50 -05:00
Nicole Thomas
e197a0fbc5
Merge pull request #46076 from rallytime/bp-46066
Back-port #46066 to 2016.11
2018-02-20 16:48:41 -05:00
Nicole Thomas
14fe423e0c
Merge pull request #46094 from kstreee/fix-memory-leak
Fix memory leak
2018-02-20 16:36:01 -05:00
Nicole Thomas
c72c1bde5f
Merge pull request #46093 from wedge-jarrad/contributing-doc-typo
Fix contributing doc typo
2018-02-20 12:37:27 -05:00
Nicole Thomas
320c2037e1
Merge pull request #46097 from vutny/fix-https-link
[DOC] Put https link to the formulas doc page
2018-02-20 12:07:38 -05:00
Nicole Thomas
0eb137fb4e
Merge pull request #46103 from bdrung/2017.7
Fix skipping Kubernetes tests if client is not installed
2018-02-20 11:33:41 -05:00
Adam Mendlik
8d9a432fb2
Add --assumeyes to yum/dnf commands in yumpkg.refresh_db
Without --assumeyes, these commands can hang waiting for
user confirmation if there is an unaccepted repository key.
2018-02-19 17:51:11 -07:00
Benjamin Drung
dd3f936557 Fix skipping Kubernetes tests if client is not installed
When the Kubernetes client is not installed, the import of
salt.modules.kubernetes will still succeed, but HAS_LIBS will be set to
False (since the library import will be covered by a try-except clause).

Therefore expect the salt.modules.kubernetes to always succeed and check
kubernetes.HAS_LIBS instead for the presence of the kubernetes library.

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-19 12:32:14 +01:00
Denys Havrysh
2062fd0e5c
[DOC] Put https link to the formulas doc page 2018-02-19 12:59:00 +02:00
gwiyeong
48080a1bae
Fixes memory leak, saltclients should be cleaned after used. 2018-02-19 16:31:32 +09:00
gwiyeong
aba00805f4
Adds set_close_callback function to removes stream instance after closed from a set streams. 2018-02-19 14:44:49 +09:00
Wedge Jarrad
5a0fe104f7 Fix contributing doc typo 2018-02-18 10:57:28 -08:00
Nicole Thomas
c3a938e994
Merge pull request #46070 from Ch3LL/fix-doc-dns
add required arg to dns_check jinja doc example
2018-02-16 15:00:44 -05:00
Nicole Thomas
01042e9d77
Merge pull request #46067 from rallytime/bp-45994
Back-port #45994 to 2017.7
2018-02-16 14:55:26 -05:00
rallytime
b94d73c53e
Pin tornado version in requirements file
tornado needs to be >= 4.2.1, but less that 5.0.

Tornado 5.0 is introducing backwards-incompatible changes. Therefore,
we need to pin the version of tornado in base.txt until we can fix
supporting Tornado 5.0 in Salt.

Refs #45790
2018-02-16 12:05:18 -05:00
Nicole Thomas
b5b083fd26
Merge pull request #46074 from Ch3LL/update-7.4
Update 2017.7.4 Release Notes with new fixes
2018-02-16 11:47:55 -05:00
Ch3LL
8d0eeeb059
Update 2017.7.4 Release Notes with new fixes 2018-02-16 11:45:49 -05:00
Erik Johnson
32f3d00e44
Merge pull request #46066 from rallytime/pin-tornado
Pin tornado version in requirements file
2018-02-16 10:40:04 -06:00
Ch3LL
2a5d855d97
add required arg to dns_check jinja doc example 2018-02-16 10:48:57 -05:00