Commit Graph

85934 Commits

Author SHA1 Message Date
Erik Johnson
fd1d89d385 Reduce unnecessary file downloading in archive/file states
The file.managed state, which is used by the archive.extracted state to
download the source archive, at some point recently was modified to
clear the file from the minion cache. This caused unnecessary
re-downloading on subsequent runs, which slows down states considerably
when dealing with larger archives.

This commit makes the following changes to improve this:

1. The fileclient now accepts a `source_hash` argument, which will cause
   the client's get_url function to skip downloading http(s) and ftp
   files if the file is already cached, and its hash matches the passed
   hash. This argument has also been added to the `cp.get_url` and
   `cp.cache_file` function.

2. We no longer try to download the file when it's an http(s) or ftp URL
   when running `file.source_list`.

3. Where `cp.cache_file` is used, we pass the `source_hash` if it is
   available.

4. A `cache_source` argument has been added to the `file.managed` state,
   defaulting to `True`. This is now used to control whether or not the
   source file is cleared from the minion cache when the state
   completes.

5. Two new states (`file.cached` and `file.not_cached`) have been added
   to managed files in the minion cache.

In addition, the `archive.extracted` state has been modified in the
following ways:

1. For consistency with `file.managed`, a `cache_source` argument has
   been added. This also deprecates `keep`. If `keep` is used,
   `cache_source` assumes its value, and a warning is added to the state
   return to let the user know to update their SLS.

2. The variable name `cached_source` (used internally in the
   `archive.extracted` state) has been renamed to `cached` to reduce
   confusion with the new `cache_source` argument.

3. The new `file.cached` and `file.not_cached` states are now used to
   manage the source tarball instead of `file.managed`. This improves
   disk usage and reduces unnecessary complexity in the state as we no
   longer keep a copy of the archive in a separate location within the
   cachedir. We now only use the copy downloaded using `cp.cache_file`
   within the `file.cached` state. This change has also necessitated a
   new home for hash files tracked by the `source_hash_update` argument,
   in a subdirectory of the minion cachedir called `archive_hash`.
2017-09-21 12:04:52 -05:00
Mike Place
0e9eaed62c Merge pull request #43653 from terminalmage/gitfs-update-url
salt.utils.gitfs: Enforce fetch URL along with refspecs and http.sslVerify
2017-09-21 10:53:21 -06:00
Mike Place
d6057a8007 Merge pull request #43678 from rallytime/add-purefa-autodocs
Add autodoc file for new purefa execution module
2017-09-21 10:35:20 -06:00
rallytime
bd88c375d8
Add autodoc file for new purefa execution module 2017-09-21 11:51:15 -04:00
Nicole Thomas
f66eb1c5ad Merge pull request #43588 from gtmanfred/do
digitalocean should be one word.
2017-09-21 09:25:38 -04:00
Nicole Thomas
f4eac59d96 Merge pull request #43652 from VertigoRay/patch-1
Salt Repo has Deb 9 and 8
2017-09-21 09:19:27 -04:00
Nicole Thomas
9eab1ea94c Merge pull request #43663 from moio/develop-multiprocessing-doc-fix
multiprocessing minion option: documentation fixes (develop)
2017-09-21 09:01:30 -04:00
Silvio Moioli
4a35fe5019 multiprocessing minion option: documentation fixes 2017-09-21 11:30:21 +02:00
Erik Johnson
5d45329111 salt.utils.gitfs: Enforce fetch URL along with refspecs and http.sslVerify
This fixes a corner case in which someone is using the `name` config
param for a given gitfs/git_pillar remote, and then changes the URL for
that remote (for instance, between https and ssh). We've simply never
enforced the fetch URL in the git config for a given remote's cachedir,
since the cachedir is typically determined by hashing the URL (or branch
+ URL for git_pillar). In those cases, changing the URL changes the
cachedir path, and results in a new repo being init'ed and the correct
URL being added to the git config as part of the initialization. But,
when using the `name` param, the path to the cachedir would remain
constant no matter what the URL is. This means that when the URL is
changed in the gitfs/git_pillar config, it isn't actually updated in the
git config file for that cachedir.

With this change, the new GitConfigParser is used to examine the fetch
URL and update it if necessary.
2017-09-21 00:05:10 -05:00
Raymond Piller
5f47ef721c Salt Repo has Deb 9 and 8 2017-09-20 21:41:08 -05:00
Daniel Wallace
2f3be5785b
there were more 2017-09-20 15:55:37 -06:00
Mike Place
8cf0588221 Merge pull request #43552 from morganwillcock/comspec
Shell grain: check %COMSPEC% for the shell for Windows
2017-09-20 10:07:09 -06:00
Mike Place
635da91135 Merge pull request #43564 from epcim/fix-nacl-decrypt
Fix names of NACL dec. methods
2017-09-20 10:02:40 -06:00
Daniel Wallace
f54ddae6bb
fix do test where space was seperated by a newline 2017-09-20 09:57:57 -06:00
Mike Place
58278a10d3 Merge pull request #43603 from Juniper/develop
keep alive feature for junos and schedular support for rpc call
2017-09-20 09:47:35 -06:00
Mike Place
56a8257558 Merge branch 'develop' into fix-nacl-decrypt 2017-09-19 18:15:43 -06:00
Mike Place
81c0c138d7 Merge pull request #43574 from spenceation/xmlutil/attribs
- Added support to parse XML ElementTrees with attributes.
2017-09-19 18:11:26 -06:00
Mike Place
5531e2f738 Merge pull request #43489 from garethgreenaway/41510_mount_opts
Fix to mount state when options are removed
2017-09-19 18:10:47 -06:00
Mike Place
8e66086c78 Merge pull request #43346 from kunal-bajpai/fix_cb_returner
Fix save_load to add doc if not exists
2017-09-19 17:34:53 -06:00
Mike Place
6d830d6ec8 Merge pull request #43510 from alexbleotu/list_cluster-gh
vsphere.list_cluster and dependencies
2017-09-19 17:18:20 -06:00
Daniel Wallace
afaf76d0ba
add release note 2017-09-19 12:50:50 -06:00
Daniel Wallace
3bae894306
digitalocean should be one word.
Everything on their webpage is a reference to DigitalOcean
2017-09-19 12:47:16 -06:00
Mike Place
91fd112e5c Remove trailing whitespace 2017-09-19 10:17:05 -06:00
Petr Michalec
3373d25f94 Merge branch 'develop' into fix-nacl-decrypt 2017-09-19 15:48:41 +02:00
Petr Michalec
ad05cc5d98
Fix names of NACL dec. methods 2017-09-19 15:46:12 +02:00
vnitinv
67aea63be9 Merge remote-tracking branch 'upstream/develop' into develop 2017-09-19 15:37:27 +05:30
Nicole Thomas
054f7c9551 Merge pull request #43559 from sdodsley/purefa_doc_fix
Fix documentation to state correct module name [purefa]
2017-09-18 16:56:25 -04:00
Nicole Thomas
c682f86e38 Lint: Add empty line at end of file 2017-09-18 16:54:04 -04:00
Simon Dodsley
35d18cd05a Fix documentation to state correct module name 2017-09-18 13:46:21 -07:00
garethgreenaway
562c9e2415 Merge branch 'develop' into 41510_mount_opts 2017-09-18 13:42:48 -07:00
Nicole Thomas
f32e838726 Merge pull request #43573 from theredcat/develop
Add an option to check & update elasticsearch template
2017-09-18 16:31:21 -04:00
garethgreenaway
26d33fe64c Merge branch 'develop' into 41510_mount_opts 2017-09-18 11:14:55 -07:00
garethgreenaway
ed8f6ed353 Merge branch 'develop' into comspec 2017-09-18 10:33:05 -07:00
garethgreenaway
431484f9c8 Merge pull request #43339 from cloudflare/napalm-beacon
Adding the first napalm beacon
2017-09-18 10:31:46 -07:00
spenceation
ac7e81b6e3 - Added support to parse XML ElementTrees with attributes. 2017-09-18 11:50:17 -04:00
Nathan DELHAYE
deff257fe7 Lint 2017-09-18 17:08:05 +02:00
Nathan DELHAYE
cdcbcdf989 Add an option to check & update elasticsearch template 2017-09-18 16:10:59 +02:00
Mircea Ulinic
40f36c9915 Merge branch 'develop' of github.com:saltstack/salt into napalm-beacon 2017-09-18 10:30:49 +00:00
Mircea Ulinic
74d1a56524 Add validate function
Also, correct some docstings and improve logged messages
2017-09-18 10:28:42 +00:00
Pedro Algarvio
826a25a287 Merge pull request #43515 from garethgreenaway/develop_home_dir_missing_from_syspaths
[develop] Fixes to setup.py
2017-09-17 19:36:57 +01:00
garethgreenaway
51daf19aaf Merge branch 'develop' into develop_home_dir_missing_from_syspaths 2017-09-16 17:40:25 -07:00
Alexandru Bleotu
55e0092519 Merge branch 'develop' into list_cluster-gh 2017-09-16 18:00:18 +01:00
garethgreenaway
e870ca1ef4 Merge branch 'develop' into 41510_mount_opts 2017-09-15 16:19:09 -07:00
garethgreenaway
a5dc3227ab Merge branch 'develop' into comspec 2017-09-15 14:38:13 -07:00
Nicole Thomas
c1ca1c4816 Merge pull request #43494 from rallytime/move-new-utils-funcs
Move new utils functions out of salt.utils and into separate files
2017-09-15 17:29:49 -04:00
Nicole Thomas
9a66d5cebc Merge pull request #43495 from rallytime/move_arg_utils
Move 2 arg-related utility functions into salt.utils.args.py
2017-09-15 17:29:10 -04:00
Morgan Willcock
cd2ff46284 Return COMSPEC as the shell for Windows 2017-09-15 21:08:54 +01:00
garethgreenaway
2c091ecaae Merge branch 'develop' into 41510_mount_opts 2017-09-15 12:44:31 -07:00
Nicole Thomas
a454065c74 Merge pull request #43501 from The-Loeki/high-out-cleanup
highstate output minor cleanup and code duplication removal
2017-09-15 15:38:09 -04:00
Alexandru Bleotu
d9b5424aab Merge branch 'develop' into list_cluster-gh 2017-09-15 20:04:33 +01:00