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

F #3859: Fix deploy_id for VM monitoring (#4751)

This commit is contained in:
Pavel Czerný 2020-05-18 16:39:47 +02:00 committed by GitHub
parent 7ff8aefb3a
commit 394a8e1eab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -113,7 +113,7 @@ class BaseDomains
mon_s = ''
@vms.each do |_uuid, vm|
mon_s << "VM = [ ID=\"#{vm[:id]}\", UUID=\"#{vm[:uuid]}\","
mon_s << "VM = [ ID=\"#{vm[:id]}\", DEPLOY_ID=\"#{vm[:deploy_id]}\","
mon_s << " MONITOR=\"#{vm.to_monitor}\"]\n"
end

View File

@ -64,7 +64,7 @@ void MonitorDriverProtocol::_monitor_vm(message_t msg)
{
int id = -1;
string monitor_b64;
string uuid;
string deploy_id;
if (vm->vector_value("ID", id) != 0)
{
@ -72,7 +72,7 @@ void MonitorDriverProtocol::_monitor_vm(message_t msg)
}
vm->vector_value("MONITOR", monitor_b64);
vm->vector_value("UUID", uuid);
vm->vector_value("DEPLOY_ID", deploy_id);
auto monitor_plain = one_util::base64_decode(monitor_b64);
@ -95,11 +95,11 @@ void MonitorDriverProtocol::_monitor_vm(message_t msg)
delete monitor_plain;
auto it = vms_templ.find(uuid);
auto it = vms_templ.find(deploy_id);
if (it == vms_templ.end())
{
vms_templ.insert(make_pair(std::move(uuid),
vms_templ.insert(make_pair(std::move(deploy_id),
make_pair(id, std::move(mon_tmpl))));
}
else