lib/beaker-pe/install/pe_utils.rb in beaker-pe-2.11.19 vs lib/beaker-pe/install/pe_utils.rb in beaker-pe-2.11.20
- old
+ new
@@ -721,12 +721,14 @@
if manage_puppet_service?(master[:pe_ver], options)
configure_puppet_agent_service(:ensure => 'stopped', :enabled => false)
end
+ # waitforlock in case stopping the agent run after stopping the agent service
+ # takes a little longer than usual
step "Run puppet to setup mcollective and pxp-agent" do
- on(master, puppet_agent('-t'), :acceptable_exit_codes => [0,2])
+ on(master, puppet_agent('-t --waitforlock 1'), :acceptable_exit_codes => [0,2])
end
install_agents_only_on(agents, opts)
step "Run puppet a second time on the primary to populate services.conf (PE-19054)" do
@@ -971,11 +973,13 @@
sleep_until_puppetdb_started(database) unless pre30database
step "First puppet agent run" do
# Run the agent once to ensure everything is in the dashboard
install_hosts.each do |host|
- on host, puppet_agent('-t'), :acceptable_exit_codes => [0,2]
+ # waitforlock in case stopping the agent run after stopping the agent service
+ # takes a little longer than usual
+ on host, puppet_agent('-t --waitforlock 1'), :acceptable_exit_codes => [0,2]
# Workaround for PE-1105 when deploying 3.0.0
# The installer did not respect our database host answers in 3.0.0,
# and would cause puppetdb to be bounced by the agent run. By sleeping
# again here, we ensure that if that bounce happens during an upgrade
@@ -1010,11 +1014,13 @@
step "Final puppet agent run" do
# Now that all hosts are in the dashbaord, run puppet one more
# time to configure mcollective
install_hosts.each do |host|
- on host, puppet_agent('-t'), :acceptable_exit_codes => [0,2]
+ # waitforlock in case stopping the agent run after stopping the agent service
+ # takes a little longer than usual
+ on host, puppet_agent('-t --waitforlock 1'), :acceptable_exit_codes => [0,2]
# To work around PE-14318 if we just ran puppet agent on the
# database node we will need to wait until puppetdb is up and
# running before continuing
if host == database && ! pre30database
sleep_until_puppetdb_started(database)
@@ -2112,11 +2118,13 @@
step "Stop puppet agents to avoid interfering with tests" do
stop_agent_on(agent_nodes, :run_in_parallel => true)
end
+ # waitforlock in case stopping the agent run after stopping the agent service
+ # takes a little longer than usual
step "Run puppet on all agent nodes" do
- on agent_nodes, puppet_agent('-t'), :acceptable_exit_codes => [0,2], :run_in_parallel => true
+ on agent_nodes, puppet_agent('-t --waitforlock 1'), :acceptable_exit_codes => [0,2], :run_in_parallel => true
end
#Workaround for windows frictionless install, see BKR-943
agent_nodes.select {|agent| agent['platform'] =~ /windows/}.each do |agent|
remove_client_datadir(agent)