-
Notifications
You must be signed in to change notification settings - Fork 115
Conversation
spodila
commented
May 9, 2017
- Fix cloning of leases for pseudo VMs, update totals before use
- unit test to replicate problem with cloned leases before this fix when using active VMs list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
if (currTotalLease == null) | ||
logger.debug("Updated total lease is null"); | ||
else { | ||
logger.debug("Updated total lease has cpu= " + currTotalLease.cpuCores() + ", mem=" + currTotalLease.memoryMB() + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For better performance use '{}' template parameter.
avm.updateCurrTotalLease(); | ||
final VirtualMachineLease currTotalLease = avm.getCurrTotalLease(); | ||
if (currTotalLease == null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it ok for this to happen? If not lets change log level to warn, and add more information (AVM hostname?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this can happen for regular VMs (not pseudo VMs).
@@ -191,13 +200,49 @@ public boolean isShutdown() { | |||
} | |||
} | |||
} | |||
else if(pHostsAdded > 0) { | |||
logger.debug("No pseudo assignments made, looking for failures"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all about logging at debug level, so lets wrap it with if(logger.isDebugEnabled())
.
Changes made in next PR except as noted above. |