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

F #4985: fix recovery_snapshots monitoring (#831)

This commit is contained in:
Jan Orel 2021-02-17 20:12:45 +01:00 committed by GitHub
parent 6b8c01c2fe
commit 1e1770b768
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -216,11 +216,13 @@ begin
:snapshot_vm_udp => {
:period => 60,
:elem_name => 'MONITOR_VM',
:method_name => :monitor_vm_udp,
:path => 'vm/snapshot'
},
:beacon_host_udp => {
:period => config.elements['PROBES_PERIOD/BEACON_HOST'].text.to_s,
:elem_name => 'BEACON_HOST',
:path => 'host/beacon'
}
}
@ -282,7 +284,9 @@ probes.each do |msg_type, conf|
da.strip!
next if da.empty?
client.send(msg_type, result == 0, da)
smethod = conf[:method_name] ? conf[:method_name] : msg_type
client.send(smethod, result == 0, da)
end
end
end

View File

@ -80,11 +80,11 @@ datastores.each do |ds|
if s.exitstatus == 0
disk_data << \
'DISK_RECOVERY_SNAPSHOT = ' \
"[ ID=#{disk_id}, TIMESTAMP=#{o}]"
"[ ID=#{disk_id}, TIMESTAMP=\"#{o}\" ]"
else
disk_data << \
'DISK_RECOVERY_SNAPSHOT = ' \
"[ ID=#{disk_id}, MSG=\"ERROR #{o}\"]"
"[ ID=#{disk_id}, MSG=\"ERROR #{o}\" ]"
end
end
@ -92,7 +92,7 @@ datastores.each do |ds|
enc_data = Base64.strict_encode64(disk_data.join("\n"))
monitor_data << \
"VM = [ ID=\"#{vm_id}\" MONITOR = \"#{enc_data}\" ]"
"VM = [ ID=\"#{vm_id}\", MONITOR=\"#{enc_data}\" ]"
end
end