mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-20 10:50:08 +03:00
parent
6b8c01c2fe
commit
1e1770b768
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user