Skip to content

Commit

Permalink
B #117: VR: Wait for one-context to be fully started (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
sk4zuzu authored Jun 19, 2024
1 parent 960f88b commit 5315c0f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion appliances/VRouter/Failover/execute.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,19 @@ def up

load_env

# Give one-context 30 seconds to fully start..
6.times do
bash 'rc-service one-context status', terminate: false
break
rescue RuntimeError
sleep 5
end.then do |result|
unless result.nil?
msg :error, 'one-context not ready!'
return
end
end

# Give keepalived 30 seconds to setup VIPs..
6.times do
bash 'rc-service keepalived ready', terminate: false
Expand All @@ -139,7 +152,7 @@ def up
sleep 5
end.then do |result|
unless result.nil?
msg :error, 'Keepalived not ready!'
msg :error, 'keepalived not ready!'
return
end
end
Expand Down

0 comments on commit 5315c0f

Please sign in to comment.