Commit Graph

48137 Commits

Author SHA1 Message Date
Erik Johnson
b23a8788c1 Add imp to windows freezer_includes
Got an ImportError on this line when I was testing on Windows.

https://github.com/terminalmage/salt/blob/43e15d8/salt/loader.py#L624
2015-02-27 14:53:59 -07:00
Loren Gordon
f3014b5b33 Convert pattern to string, fixes saltstack#21051 2015-02-27 14:53:59 -07:00
Erik Johnson
f7532697a0 Support Chocolatey 0.9.9+
The upcoming release will require "--yes" to execute commands that
change the machine's state (install/remove packages, etc). Also, our old
version determination code won't work with it. This commit fixes both
issues.
2015-02-27 14:53:59 -07:00
Justin Findlay
e743675219 simplify yaml parsing for publish module
updates #20992
2015-02-27 14:53:59 -07:00
Erik Johnson
be8c392471 Catch FileserverConfigError exceptions on master startup
This causes the master to fail to start when there are fileserver config
issues, leading people quicker to the log to investigate, where they
will find a meaningful error message. This should it much quicker and
easier for users to realize there are gitfs/hgfs/svnfs fileserver config
problems.

Fixes #21021.
2015-02-27 14:53:59 -07:00
Erik Johnson
bf38fbb5ca svnfs: Raise exceptions on invalid configuration 2015-02-27 14:53:59 -07:00
Erik Johnson
f062563cac hg: Raise exceptions on invalid configuration 2015-02-27 14:53:59 -07:00
Erik Johnson
eb17e309ae gitfs: Raise exceptions on invalid configuration 2015-02-27 14:53:59 -07:00
rallytime
b01196e7e8 Add transport key to mocked opts to fix batch unit tests 2015-02-27 14:53:58 -07:00
Erik Johnson
6563bb80e3 Fix missing space in log message 2015-02-27 14:53:58 -07:00
Colton Myers
f5325dcfea Fix for salt-ssh without command line parsers 2015-02-27 14:53:58 -07:00
Erik Johnson
0b1401174a Add FileserverConfigError exception class 2015-02-27 14:53:58 -07:00
rallytime
ec20b2c4ba Pylint fix 2015-02-27 14:53:58 -07:00
Paul Tonelli
362e8c5ce0 use file.replace instead of file.sed 2015-02-27 14:53:58 -07:00
Paul Tonelli
123daf3090 fix set_locale when locale file does not exist (in RedHat family) 2015-02-27 14:53:58 -07:00
rallytime
4248bbfa2e Use LooseVersion instead of StrictVersion to use an RC version of MongoDB
Fixes #21012
2015-02-27 14:53:58 -07:00
Mike Place
14592ed1f9 Adjust batch test 2015-02-27 14:53:58 -07:00
Mike Place
6c5f3f8d2e Just use ckminions in batch mode.
Refs #18358
2015-02-27 14:53:58 -07:00
Tom Nitti
d8e3573126 correctly count raid devices when creating an array with spares 2015-02-27 14:53:58 -07:00
Warren Turkal
5f7f335efe Add version to a deprecation log message. 2015-02-27 14:53:58 -07:00
Erik Johnson
341b6622c8 gitfs: Add warning about ssh:// URLs (dulwich) 2015-02-27 14:53:57 -07:00
Erik Johnson
7ed9c66b02 gitfs: Support ssh:// URLs for dulwich 2015-02-27 14:53:57 -07:00
Erik Johnson
cc248c2d51 fix missing import 2015-02-27 14:53:57 -07:00
Erik Johnson
fbb93258eb Fix CLI example for fileserver.clear_cache runner 2015-02-27 14:53:57 -07:00
Erik Johnson
e3ebeddfa1 Lint fixes 2015-02-27 14:53:57 -07:00
Erik Johnson
3cd4c5d0aa Fix spurious error in master log
When only GitPython is installed, and no gitfs_provider is set, an error
about pygit2 not being available is logged. This should not happen, as
gitfs should just select the first available out of pygit2, gitpython,
and dulwich.

This fixes #17945 by suppressing the error.
2015-02-27 14:53:57 -07:00
Erik Johnson
05e39004d1 Log success/failure in dealing with lockfiles in their actual functions
Logging them separately in update() doesn't make much sense.
2015-02-27 14:53:57 -07:00
Erik Johnson
92a2220194 Add salt.fileserver.gitfs.lock()
Also rewrite salt.fileserver.gitfs.clear_lock() to accept a repo conf
dict instead of a pattern, so that locking and unlocking in
salt.fileserver.gitfs.update() can use the same code as the fileserver
runner.
2015-02-27 14:53:57 -07:00
Erik Johnson
02f4c33e5e Add salt.fileserver.svnfs.lock()
Also rewrite salt.fileserver.svnfs.clear_lock() to accept a repo conf
dict instead of a pattern, so that locking and unlocking in
salt.fileserver.svnfs.update() can use the same code as the fileserver
runner.
2015-02-27 14:53:57 -07:00
Erik Johnson
4ce8a9d064 Improve salt fileserver documentation 2015-02-27 14:53:57 -07:00
Erik Johnson
30a0145ff3 Add salt.runners.fileserver.lock() 2015-02-27 14:53:57 -07:00
Erik Johnson
28ccb7cb68 Add salt.runners.fileserver.{,empty_}dir_list
This rounds out the runner support for the fileserver runner.
2015-02-27 14:53:57 -07:00
Erik Johnson
1c55cf92e1 Add a backend argument for salt.runners.fileserver.{file,symlink}_list
This allows for backends to be excluded when executing these runners.
2015-02-27 14:53:56 -07:00
Erik Johnson
5ae5c0bb07 Add function in Fileserver class to invoke fsb.lock 2015-02-27 14:53:56 -07:00
Erik Johnson
4fe06633d7 Add salt.fileserver.hgfs.lock()
Also rewrite salt.fileserver.hgfs.clear_lock() to accept a repo conf
dict instead of a pattern, so that locking and unlocking in
salt.fileserver.hgfs.update() can use the same code as the fileserver
runner.
2015-02-27 14:53:56 -07:00
Erik Johnson
67bb88034e Support fileserver backend passed in load for fileserver operations
Also support "-backend" notation to exclude a backend from a given
operation.
2015-02-27 14:53:56 -07:00
Erik Johnson
519d75151b Use new clear_lock() function to clear update lock in update() 2015-02-27 14:53:56 -07:00
Erik Johnson
373ae6b6a0 svnfs: Avoid 2nd init() by returning repos from _clear_old_remotes 2015-02-27 14:53:56 -07:00
Erik Johnson
c5a26d9d71 hgfs: Avoid 2nd init() by returning repos from _clear_old_remotes 2015-02-27 14:53:56 -07:00
Erik Johnson
677fec21b7 gitfs/hgfs/svnfs: Rewrite _clear_old_remotes()
Rather than using a subtractive approach (doing an os.listdir() and then
removing the stuff we don't want to delete), instead use an additive
approach and assemble a list of things we *do* want to delete. This
makes the function easier to read and maintain.
2015-02-27 14:53:56 -07:00
Erik Johnson
fd102a9081 Log an error if unexpected files are found in gitfs/hgfs/svnfs cachedir
This loop is designed to remove the cache directories from old remotes.
shutil.rmtree() will throw an OSError, however, if run on something
other than a directory. This commit catches this exception and logs it.
Seeing this error in the log will be a reminder that some new file has
been added to the cachedir to be used by the FS backend, and that it
needs to be added to the exclusion logic above.
2015-02-27 14:53:56 -07:00
Erik Johnson
a2d78e57f7 Move hgfs update lock out of hg checkout
Newer hglib freaks out if files that don't belong in the repo are
present. This commit moves the update lock up a level into
$cachedir/hgfs.
2015-02-27 14:53:56 -07:00
Erik Johnson
c83e558728 Fix traceback in salt.fileserver.hgfs.init()
Older versions of hglib did not raise an exception when no refs were
found. This commit catches the exception, fixing a traceback that
prevents new remotes from ever being fetched for the first time.
2015-02-27 14:53:56 -07:00
Erik Johnson
3c51b3116c Add logging noting which remote is being fetched 2015-02-27 14:53:56 -07:00
Erik Johnson
d61cc123f0 Use shorter version of salt-run command in warning 2015-02-27 14:53:56 -07:00
Erik Johnson
537a78ec5c Add salt.fileserver.svnfs.clear_lock() 2015-02-27 14:53:55 -07:00
Erik Johnson
48b0977e01 Add salt.fileserver.hgfs.clear_lock() 2015-02-27 14:53:55 -07:00
Erik Johnson
1632e09e44 Allow "fs" versions of VCS backends to work as arguments to fileserver runner functions
i.e. "gitfs" and "git" both work, "hgfs" and "hg", etc. This should help
reduce confusion.
2015-02-27 14:53:55 -07:00
Erik Johnson
13f7d60efb fix broken salt.utils.is_fcntl_available 2015-02-27 14:53:55 -07:00
Erik Johnson
1a5569ff9e add fileserver.clear_lock runner 2015-02-27 14:53:55 -07:00