Commit Graph

574 Commits

Author SHA1 Message Date
Daniel Wozniak
584e3f2460
Merge pull request #54001 from garethgreenaway/add_metaproxy_2019_2_1
[2019.2.1] Porting metaproxy changes in #50183 to 2019.2.1
2019-08-07 21:24:30 -07:00
cmcmarrow
05cd93fcfd
fixs integration terminate error 2019-07-29 09:20:46 -06:00
cmcmarrow
69c3106837
fixs integration terminate error 2019-07-29 09:15:54 -06:00
Gareth J. Greenaway
51726b174e
POrting metaproxy changes in #50183 to 2019.2.1 2019-07-24 10:53:10 -07:00
Daniel A. Wozniak
17c983b27b
Fix linter 2019-06-14 19:18:38 +00:00
Daniel A. Wozniak
f1b65d1e26
Fix syndic connection when using tcp transport 2019-06-14 19:13:34 +00:00
Pedro Algarvio
cefdd907c1
Stop error messages about missing roster file on syndic master 2019-05-27 11:46:31 +01:00
Pedro Algarvio
381f5fea52
Limit and reduce the ammount of log records sent over the wire 2019-05-08 13:16:44 +01:00
Pedro Algarvio
666ca9f7cd
Fix proxy minion startup issue on the test suite 2019-05-08 13:16:43 +01:00
Daniel A. Wozniak
e9e57cfb05
Syndic roster not in 2017.7.9 2019-05-08 13:16:42 +01:00
Daniel A. Wozniak
111c63a4dc
Create the roster even when not running ssh 2019-05-08 13:16:42 +01:00
Pedro Algarvio
7e79b182b6
We need to make sure the virtualenv path entry is removed when searching 2019-05-08 13:16:38 +01:00
Pedro Algarvio
ea9d2460f0
We must also provide venv_bin when running within a virtualenv 2019-05-08 13:16:37 +01:00
Pedro Algarvio
361ef6e50f
Don't try to change ownership on non existing paths 2019-05-08 13:16:34 +01:00
Daniel A. Wozniak
a5af9c5388
Increase minion wait for slow boxes 2019-02-14 02:04:35 -07:00
Daniel A. Wozniak
ab0a6a38e5
fix linter 2019-02-12 12:04:37 -07:00
Daniel A. Wozniak
f2e4a30916
Wait for minions to be pingable before starting tests 2019-02-12 12:04:34 -07:00
Daniel A. Wozniak
65f38b5ab2
peserve newlines from pillar data for file.managed 2019-01-19 16:11:49 -07:00
rallytime
39c442ca1c
Merge branch '2018.3.3' into '2018.3'
Conflicts:
  - salt/modules/file.py
  - tests/integration/states/test_file.py
2018-08-24 14:08:30 -04:00
rallytime
c3ecefc785
Merge branch '2017.7' into '2018.3'
Conflicts:
  - salt/modules/file.py
  - salt/modules/win_service.py
  - salt/states/mount.py
  - salt/states/service.py
  - tests/integration/__init__.py
  - tests/integration/runners/test_state.py
  - tests/integration/states/test_file.py
  - tests/unit/states/test_file.py
2018-08-23 11:50:41 -04:00
Erik Johnson
a2d2cd317b
Fix hanging syndic test
There was no `syndic_master` and the fallback DNS lookup failed. This
caused a traceback which hung the test suite.
2018-08-17 17:30:22 -05:00
Daniel A. Wozniak
3384864e8f
add Exception type 2018-08-16 11:57:28 -07:00
Daniel A. Wozniak
9da79dd0b5
Allow test suite to finish if tmp dir removal fails 2018-08-16 10:48:19 -07:00
Daniel Wallace
9ce14b2a12
pass opts to SSHClient for enable_ssh_minions
Also, use ckminions to get the minions from the roster, instead of doing it in
publish.
2018-02-20 16:06:00 -07:00
twangboy
cf1007bfc8
Fix stacktrace at the end of a test 2018-01-25 18:45:43 +00:00
Daniel Wallace
065ae4e61f
increase timeout for starting daemons 2018-01-11 10:45:47 -07:00
Erik Johnson
002aa88a97
Replace yaml usage with a helper to ensure unicode is handled properly
Without allow_unicode=True, unicode characters are processed through the
str representer and on Python 2 are dumped as a Unicode code point (i.e.
a literal \u0414). This commit makes allow_unicode=True the default in
our salt.utils.yamlloader.safe_dump() helper. It also adds a new
salt.utils.yamlloader.dump() helper which wraps yaml.dump() and also
makes allow_unicode=True the default.

To make importing and using our custom yaml loader/dumper easier, a
convenience module called salt.utils.yaml has been added, which does a
wildcard import from both salt.utils.yamldumper and
salt.utils.yamlloader.

Refs to yaml.load/dump and yaml.safe_load/safe_dump have been updated to
salt.utils.yaml, to ensure that unicode is handled properly.
2018-01-03 14:14:21 -06:00
Erik Johnson
7b13a7df8b
Replace json module usage with a helper to ensure unicode content is handled properly
This adds wrappers for json.dump{,s} which disable `ensure_ascii` by
default.
2017-12-27 09:30:58 -06:00
rallytime
08c71f13e4
Merge branch '2017.7' into 'oxygen'
Conflicts:
  - doc/ref/configuration/minion.rst
  - doc/topics/thorium/index.rst
  - salt/beacons/__init__.py
  - salt/client/mixins.py
  - salt/client/ssh/wrapper/state.py
  - salt/daemons/masterapi.py
  - salt/grains/extra.py
  - salt/minion.py
  - salt/modules/cron.py
  - salt/modules/file.py
  - salt/modules/mac_user.py
  - salt/modules/napalm_network.py
  - salt/modules/state.py
  - salt/modules/win_file.py
  - salt/modules/win_pkg.py
  - salt/proxy/dummy.py
  - salt/state.py
  - salt/states/file.py
  - salt/states/lxc.py
  - salt/utils/__init__.py
  - salt/utils/schedule.py
  - tests/integration/modules/test_file.py
  - tests/integration/modules/test_groupadd.py
  - tests/integration/ssh/test_state.py
  - tests/integration/states/test_file.py
  - tests/unit/daemons/test_masterapi.py
  - tests/unit/grains/test_core.py
  - tests/unit/modules/test_disk.py
  - tests/unit/modules/test_napalm_network.py
  - tests/unit/modules/test_state.py
  - tests/unit/test_minion.py
  - tests/unit/utils/test_process.py
2017-12-11 18:24:41 -05:00
Nicole Thomas
0697ed0645
Merge branch 'develop' into accept-minions-from-grains 2017-12-04 16:10:32 -05:00
Ch3LL
9cc853e3d5
Add masterless state.highstate integration test 2017-11-29 10:15:56 -05:00
Ch3LL
b3b5ecc6ff
Add pillar.items test for masterless 2017-11-22 15:40:57 -05:00
rallytime
052b13c98e
Merge branch '2017.7' into 'develop'
Conflicts:
  - salt/cli/daemons.py
  - salt/client/ssh/__init__.py
  - salt/modules/win_pkg.py
  - salt/netapi/rest_cherrypy/app.py
  - salt/proxy/fx2.py
  - salt/utils/__init__.py
  - salt/utils/jinja.py
  - salt/utils/napalm.py
  - salt/utils/path.py
  - salt/utils/verify.py
  - tests/integration/modules/test_saltutil.py
  - tests/integration/states/test_service.py
  - tests/unit/utils/test_verify.py
2017-11-22 12:36:03 -05:00
twangboy
47114fdb30
Pass root_dirs to the win_verify_env function
Remove while loop that was hanging when `salt` wasn't in the path
Add salt.util.path.safe_path function to check for unsafe paths
Pass root_dir to all calls to `verify_env`
2017-11-13 13:05:23 -07:00
Mike Place
f2aa3539ef
Merge branch 'develop' into accept-minions-from-grains 2017-11-13 11:13:50 -07:00
rallytime
2c052e34b3
Merge branch '2017.7' into 'develop'
Conflicts:
  - .gitignore
  - salt/modules/win_lgpo.py
  - salt/utils/__init__.py
  - tests/integration/spm/test_build.py
  - tests/unit/test_pydsl.py
2017-11-05 20:28:51 -07:00
Benedikt Werner
c7ee766984
Fix test autosign_file permissions 2017-10-29 14:02:39 +01:00
Benedikt Werner
64e30ac0b2
Changed integration tests to use autosign_file to authenticate minions 2017-10-29 14:02:38 +01:00
Ch3LL
34e2955445
add saltutil.refresh_pillar test 2017-10-25 15:56:49 -04:00
Erik Johnson
554c685ce5
Move 4 functions from salt.utils
- salt.utils.reinit_crypto -> salt.utils.crypt.reinit_crypto
- salt.utils.appendproctitle -> salt.utils.process.appendproctitle
- salt.utils.daemonize -> salt.utils.process.daemonize
- salt.utils.daemonize_if -> salt.utils.process.daemonize_if
2017-10-11 14:49:50 -05:00
rallytime
29a763ffcb Lint: Remove extra space 2017-08-30 09:38:39 -04:00
rallytime
26f52bd2b8 Move get_colors and get_color_theme to salt.utils.color.py
Moves the `get_colors` and `get_color_theme` out of `salt.utils.py`
and into a new file named `salt.utils.color.py`.

This PR moves the original functions, adds a deprecation warning to
the old function paths, and updates any references to the functions
in Salt code to the new location. This includes moving a test as well.
2017-08-29 17:33:01 -04:00
Erik Johnson
3184168365 Use explicit unicode strings + break up salt.utils
This PR is part of what will be an ongoing effort to use explicit
unicode strings in Salt. Because Python 3 does not suport Python 2's raw
unicode string syntax (i.e. `ur'\d+'`), we must use
`salt.utils.locales.sdecode()` to ensure that the raw string is unicode.
However, because of how `salt/utils/__init__.py` has evolved into the
hulking monstrosity it is today, this means importing a large module in
places where it is not needed, which could negatively impact
performance. For this reason, this PR also breaks out some of the
functions from `salt/utils/__init__.py` into new/existing modules under
`salt/utils/`. The long term goal will be that the modules within this
directory do not depend on importing `salt.utils`.

A summary of the changes in this PR is as follows:

* Moves the following functions from `salt.utils` to new locations
  (including a deprecation warning if invoked from `salt.utils`):
  `to_bytes`, `to_str`, `to_unicode`, `str_to_num`, `is_quoted`,
  `dequote`, `is_hex`, `is_bin_str`, `rand_string`,
  `contains_whitespace`, `clean_kwargs`, `invalid_kwargs`, `which`,
  `which_bin`, `path_join`, `shlex_split`, `rand_str`, `is_windows`,
  `is_proxy`, `is_linux`, `is_darwin`, `is_sunos`, `is_smartos`,
  `is_smartos_globalzone`, `is_smartos_zone`, `is_freebsd`, `is_netbsd`,
  `is_openbsd`, `is_aix`
* Moves the functions already deprecated by @rallytime to the bottom of
  `salt/utils/__init__.py` for better organization, so we can keep the
  deprecated ones separate from the ones yet to be deprecated as we
  continue to break up `salt.utils`
* Updates `salt/*.py` and all files under `salt/client/` to use explicit
  unicode string literals.
* Gets rid of implicit imports of `salt.utils` (e.g. `from salt.utils
  import foo` becomes `import salt.utils.foo as foo`).
* Renames the `test.rand_str` function to `test.random_hash` to more
  accurately reflect what it does
* Modifies `salt.utils.stringutils.random()` (née `salt.utils.rand_string()`)
  such that it returns a string matching the passed size. Previously
  this function would get `size` bytes from `os.urandom()`,
  base64-encode it, and return the result, which would in most cases not
  be equal to the passed size.
2017-08-08 13:33:43 -05:00
rallytime
ccf790a83f Update all references for moved functions to use "files" util
- fopen
- flopen
- fpopen
- safe_rm
- is_empty
- is_fcntl_available
2017-07-18 10:31:01 -06:00
C. R. Oldham
4540f82aaa Port salt-proxy tests to the testsuite changes in Nitrogen. 2017-06-06 13:49:16 -06:00
Erik Johnson
3751881f07 Remove iproute/ifconfig warning from test suite startup
Recent changes in the test suite no longer rely on listing IPv4
addresses to confirm that the daemons have started, so this warning is
now spurious.
2017-05-26 08:53:14 -05:00
rallytime
5b27c2daf8 Comment out/remove proxy pieces from integration tests file
This was left over from a merge-forward. The proxy minion testing
pieces could not be completely merged-forward due to large conflicts
in this file. Please see the comment in PR #41113 for more information.
2017-05-24 09:51:00 -06:00
rallytime
616ac7289b Merge branch '2016.11' into 'nitrogen'
Conflicts:
  - salt/config/__init__.py
  - salt/modules/elasticsearch.py
  - tests/integration/__init__.py
2017-05-23 10:36:41 -06:00
Erik Johnson
03b5420988 Remove git_pillar warning from integration suite startup
This is no longer needed since the git_pillar configuration has been
removed from the suite's master config file now that git_pillar
integration tests have been added.
2017-05-10 11:13:43 -05:00
C. R. Oldham
3be90cc9f4 Rescue proxy_auto_tests PR from git rebase hell 2017-05-05 17:04:00 -06:00