Wait some time before checking puppet state
This tries to fix really strange bug. Puppet finished its run without any error but for some reason last_run_summary.yaml was not updated immediately. If puppet finishes and last_run_summary.yaml is not updated we assume that puppet crushed. Change-Id: I81cc57564089dfbe937dd7e447b65fe645c8bae9 Closes-bug: #1458780
This commit is contained in:
parent
0bd72c7236
commit
d579d95dbf
@ -45,8 +45,9 @@ module Astute
|
||||
puppet_tasks = @nodes.map { |n| puppet_task(n) }
|
||||
puppet_tasks.each(&:run)
|
||||
|
||||
while puppet_tasks.any? { |t| t.status == 'deploying' }
|
||||
loop do
|
||||
sleep Astute.config.puppet_deploy_interval
|
||||
break if !puppet_tasks.any? { |t| t.status == 'deploying' }
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -82,9 +82,9 @@ describe "PuppetdDeployer" do
|
||||
.then.returns('ready')
|
||||
.then.returns('ready')
|
||||
|
||||
PuppetdDeployer.expects(:sleep).with(Astute.config.puppet_deploy_interval)
|
||||
PuppetdDeployer.expects(:sleep).with(Astute.config.puppet_deploy_interval).twice
|
||||
PuppetdDeployer.deploy(ctx, nodes)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user