mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-27 10:50:10 +03:00
feature #3383: Use VM_NAME from monitor tro display ZOMBIE and WILD VMs. Mark VMs as imported
(cherry picked from commit 6371877897528d37f6f7794e014578c0a77209fe)
This commit is contained in:
parent
650e2718b1
commit
f50883a0a8
@ -366,23 +366,41 @@ int Host::update_info(Template &tmpl,
|
||||
// Reported as zombie at least 2 times?
|
||||
if (prev_tmp_zombie.count(vmid) == 1)
|
||||
{
|
||||
string zname;
|
||||
|
||||
if (num_zombies++ > 0)
|
||||
{
|
||||
zombie << ", ";
|
||||
}
|
||||
|
||||
zombie << vatt->vector_value("DEPLOY_ID");
|
||||
zname = vatt->vector_value("VM_NAME");
|
||||
|
||||
if (zname.empty())
|
||||
{
|
||||
zname = vatt->vector_value("DEPLOY_ID");
|
||||
}
|
||||
|
||||
zombie << zname;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (rc == 0) //not ours
|
||||
{
|
||||
string wname;
|
||||
|
||||
if (num_wilds++ > 0)
|
||||
{
|
||||
wild << ", ";
|
||||
}
|
||||
|
||||
wild << vatt->vector_value("DEPLOY_ID");
|
||||
wname = vatt->vector_value("VM_NAME");
|
||||
|
||||
if (wname.empty())
|
||||
{
|
||||
wname = vatt->vector_value("DEPLOY_ID");
|
||||
}
|
||||
|
||||
wild << wname;
|
||||
}
|
||||
|
||||
delete *it;
|
||||
|
@ -448,6 +448,7 @@ int VirtualMachine::insert(SqlDB * db, string& error_str)
|
||||
if (!value.empty())
|
||||
{
|
||||
deploy_id = value;
|
||||
obj_template->add("IMPORTED", "YES");
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user