Commit Graph

85200 Commits

Author SHA1 Message Date
Nicole Thomas
15405c8760
Merge pull request #46239 from terminalmage/issue46109
archive.extracted: don't check source file when if_missing path exists
2018-02-28 10:01:35 -05:00
Erik Johnson
586d8b0dcf
archive.extracted: don't check source file when if_missing path exists
This exits the state early with a True result when the if_missing path
exists.
2018-02-27 23:39:32 -06:00
Nicole Thomas
633e1208e4
Merge pull request #46221 from terminalmage/salt-jenkins-854
Fix hanging tests in integration suite
2018-02-27 16:32:25 -05:00
Erik Johnson
0eb012659c
Fix hanging tests in integration suite
A recent change to nginx appears to be causing this test to fail to
cache the test file in the temp nginx instance we've spun up. This
causes the return of cp.cache_file to be False, which in and of itself
should be enough to fail the test. But since we're not asserting on the
cp.cache_file results, flow proceeds to the next block of code, in which
we open the "file" that we cached. Some genius thought it would be a
swell idea to make io.open() successfully open a filehandle when the
path passed to it is a boolean False. When you try to read from this
filehandle, an AMAZING thing happens... It just blocks. Forever. I know,
right? Pure genius.

This commit adds an assert so that the test fails gracefully and doesn't
try to read from a bogus filehandle that SHOULDN'T EVEN EXIST.
2018-02-27 13:32:57 -06:00
Nicole Thomas
7917277345
Merge pull request #46214 from vutny/formulas-readme-formatting
[DOC] Replace `note` rST block for GitHub
2018-02-27 12:42:36 -05:00
Denys Havrysh
d702846961
[DOC] Replace note rST block for GitHub 2018-02-27 16:53:39 +02:00
Nicole Thomas
a2e099b744
Merge pull request #46203 from Ch3LL/7.5_release
Add 2017.7.5 Release Notes File
2018-02-26 16:17:47 -05:00
Ch3LL
6ddf3246ce
Add 2017.7.5 Release Notes File 2018-02-26 14:22:20 -05:00
Nicole Thomas
973b227818
Merge pull request #46201 from rallytime/merge-2017.7
[2017.7] Merge forward from 2016.11 to 2017.7
2018-02-26 13:56:47 -05:00
rallytime
9ac2101baa
Merge branch '2016.11' into '2017.7'
No conflicts.
2018-02-26 13:55:26 -05:00
Nicole Thomas
89cf2e5061
Merge pull request #46139 from bdrung/os-grains
Add os grains test cases for Debian/Ubuntu and fix oscodename on Ubuntu
2018-02-26 11:44:04 -05:00
Megan Wilhite
a4c5417d23
Merge pull request #46132 from rallytime/2016.11_update_version_doc
Update release versions for the 2016.11 branch
2018-02-26 11:43:32 -05:00
Megan Wilhite
c8c71e75ca
Merge pull request #46133 from rallytime/2017.7_update_version_doc
Update release versions for the 2017.7 branch
2018-02-26 11:42:42 -05:00
Nicole Thomas
390d592aa6
Merge pull request #46185 from terminalmage/issue46124
gitfs: Fix detection of base env when its ref is also mapped to a different env
2018-02-26 09:52:15 -05:00
Benjamin Drung
0b445f2a37 tests: Add unit tests for _parse_os_release()
Add tests cases to fully cover _parse_os_release().

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:38:23 +01:00
Benjamin Drung
f6069b77ed Fix osfinger grain on Debian
Rework _run_os_grains_tests() to check all os grains including osfinger.
Fix osfinger on Debian (e.g. use "Debian-9" instead of
"Debian GNU/Linux-9").

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Benjamin Drung
8dde55a761 tests: Add os_grains test cases for Debian
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Benjamin Drung
ff02ab9937 tests: Add Ubuntu 17.10 (artful) os_grains test case
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Benjamin Drung
77d5356aba Fix incorrect oscodename grain on Ubuntu
Use the full content of /etc/os-release for the Ubuntu 16.04 (artful)
os_grains test case. This reveals a bug that 'oscodename' is not
correctly calculated if /etc/os-release provides PRETTY_NAME:

FAIL: test_ubuntu_os_grains (tests.unit.grains.test_core.CoreGrainsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests/unit/grains/test_core.py", line 439, in test_ubuntu_os_grains
    self._run_ubuntu_os_grains_tests(_os_release_map)
  File "tests/unit/grains/test_core.py", line 446, in _run_ubuntu_os_grains_tests
    self._run_os_grains_tests(os_release_map)
  File "tests/unit/grains/test_core.py", line 262, in _run_os_grains_tests
    self.assertEqual(os_grains.get('oscodename'), os_release_map['oscodename'])
AssertionError: 'Ubuntu 16.04.3 LTS' != 'xenial'
- Ubuntu 16.04.3 LTS
+ xenial

fixes #34423 for Ubuntu
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
Benjamin Drung
7e62dc9fd2 tests: Support reading os-release files from disk
Instead of storing pre-parsed os-release files, add support for reading
os-release files from disk.

Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-02-26 13:36:33 +01:00
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
Erik Johnson
3b58dd0da0
gitfs: Fix detection of base env when its ref is also mapped to a different env 2018-02-25 11:58:11 -06: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
rallytime
0ed338e643
Update release versions for the 2017.7 branch 2018-02-21 06:37:22 -05:00