Created
March 19, 2016 17:30
-
-
Save jettero/c57091950154349d6677 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /usr/lib/python2.6/site-packages/salt/pillar/git_pillar.py 2016-02-16 20:52:19.000000000 -0800 | |
+++ git_pillar.py 2016-03-19 10:14:52.732381344 -0700 | |
@@ -254,7 +254,13 @@ | |
opts['pillar_roots'] = {} | |
pillar = salt.utils.gitfs.GitPillar(opts) | |
pillar.init_remotes(repo, PER_REMOTE_OVERRIDES) | |
- pillar.checkout() | |
+ k = repo[0].keys()[0].replace(' ', '-').replace('/','-') | |
+ lf = "/var/cache/salt/master/pauls-workaround-%s.lock" % k | |
+ from lockfile import FileLock | |
+ lock = FileLock(lf) | |
+ log.info("paul's workaround for pillar concurrency issues is forcing me to wait my turn on the pillar.checkout") | |
+ with lock: | |
+ pillar.checkout() | |
ret = {} | |
merge_strategy = __opts__.get( | |
'pillar_source_merging_strategy', |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment