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

B #5558: Faster transition host DISABLED->MONITORED (#1497)

This commit is contained in:
Pavel Czerný 2021-10-08 17:48:27 +02:00 committed by GitHub
parent 03c6397266
commit 7ea2ae04ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -316,7 +316,14 @@ void Host::update_wilds()
void Host::enable()
{
state = INIT;
if (state == DISABLED && host_share.get_total_cpu() > 0)
{
state = MONITORED;
}
else
{
state = INIT;
}
};
/* -------------------------------------------------------------------------- */