1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

F #3859: Update onehost forceupdate internals

This commit is contained in:
Daniel Clavijo Coca 2020-05-25 10:29:02 -05:00
parent 03066c2027
commit 4eb0662ea7
No known key found for this signature in database
GPG Key ID: F4D2A4195D4E4064

View File

@ -474,15 +474,19 @@ class OneHostHelper < OpenNebulaHelper::OneHelper
break unless host
cmd = 'cat /tmp/one-monitord-client.pid | xargs kill -HUP'
system("ssh #{host['NAME']} \"#{cmd}\" 2>/dev/null")
hostname = host['NAME']
cmd = "onehost offline #{hostname}"
cmd << " && onehost enable #{hostname}"
system("ssh #{hostname} \"#{cmd}\" 2>/dev/null")
if !$CHILD_STATUS.success?
error_lock.synchronize do
host_errors << host['NAME']
host_errors << hostname
end
else
puts "#{host['NAME']} monitoring forced"
puts "#{hostname} monitoring forced"
end
end
end