Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jettero/c57091950154349d6677 to your computer and use it in GitHub Desktop.
Save jettero/c57091950154349d6677 to your computer and use it in GitHub Desktop.
--- /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