Add a mutex around puppet runs.
Change-Id: I4996c44e5dfe68ff144494a545db9d05f93b96cd Reviewed-on: https://review.openstack.org/320 Reviewed-by: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
52684800e7
commit
352cdce842
@ -26,13 +26,15 @@ class openstack_base {
|
||||
"bzr",
|
||||
"git",
|
||||
"python-setuptools",
|
||||
"util-linux",
|
||||
"byobu"]
|
||||
package { $packages: ensure => "latest" }
|
||||
|
||||
cron { "updatepuppet":
|
||||
user => root,
|
||||
minute => "*/15",
|
||||
command => 'sleep $((RANDOM\%600)) && cd /root/openstack-ci-puppet && /usr/bin/git pull -q && /var/lib/gems/1.8/bin/puppet apply -l /tmp/manifest.log --modulepath=/root/openstack-ci-puppet/modules manifests/site.pp',
|
||||
command => 'sleep $((RANDOM\%600)) && cd /root/openstack-ci-puppet && /usr/bin/git pull -q && /usr/bin/flock -x /var/run/puppet.lock -w 120 /var/lib/gems/1.8/bin/puppet apply -l /tmp/manifest.log --modulepath=/root/openstack-ci-puppet/modules manifests/site.pp',
|
||||
require => Package['util-linux'],
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user