mirror of https://github.com/apache/cloudstack.git
Merge branch '4.14'
This commit is contained in:
commit
644731edad
|
|
@ -75,7 +75,6 @@ import org.libvirt.DomainSnapshot;
|
|||
import org.libvirt.LibvirtException;
|
||||
import org.libvirt.MemoryStatistic;
|
||||
import org.libvirt.Network;
|
||||
import org.libvirt.NodeInfo;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.Node;
|
||||
|
|
@ -3627,8 +3626,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
|
|||
elapsedTime = now.getTimeInMillis() - oldStats._timestamp.getTimeInMillis();
|
||||
double utilization = (info.cpuTime - oldStats._usedTime) / ((double)elapsedTime * 1000000);
|
||||
|
||||
final NodeInfo node = conn.nodeInfo();
|
||||
utilization = utilization / node.cpus;
|
||||
utilization = utilization / info.nrVirtCpu;
|
||||
if (utilization > 0) {
|
||||
stats.setCPUUtilization(utilization * 100);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2063,6 +2063,7 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager,
|
|||
ex.addProxyObject(String.valueOf(id), "templateId");
|
||||
throw ex;
|
||||
}
|
||||
long oldGuestOSId = template.getGuestOSId();
|
||||
|
||||
verifyTemplateId(id);
|
||||
|
||||
|
|
@ -2119,7 +2120,6 @@ public class TemplateManagerImpl extends ManagerBase implements TemplateManager,
|
|||
}
|
||||
|
||||
if (guestOSId != null) {
|
||||
long oldGuestOSId = template.getGuestOSId();
|
||||
GuestOSVO guestOS = _guestOSDao.findById(guestOSId);
|
||||
|
||||
if (guestOS == null) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue