Doron Fediuck has posted comments on this change.
Change subject: engine: Report when vm gets less the Guaranteed memory
......................................................................
Patch Set 3: (4 inline comments)
Agree with Omer on separating reformatting next time.
See other issues inline.
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatistics.java
Line 130: this.usage_mem_percentField = value;
Line 131: }
Line 132:
Line 133: // NOT PRESISTED
Line 134: private Integer currentMemory;
Omer, good point. It's the guest's current memory.
Ballooning is handled by mom...
Line 135:
Line 136: public Integer getCurrentMemory() {
Line 137: return currentMemory;
Line 138: }
....................................................
File
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/auditloghandling/AuditLogDirector.java
Line 504: severities.put(AuditLogType.VM_PAUSED_ERROR,
AuditLogSeverity.ERROR);
Line 505: severities.put(AuditLogType.VM_PAUSED_EIO,
AuditLogSeverity.ERROR);
Line 506: severities.put(AuditLogType.VM_PAUSED_EPERM,
AuditLogSeverity.ERROR);
Line 507: severities.put(AuditLogType.VM_POWER_DOWN_FAILED,
AuditLogSeverity.WARNING);
Line 508: severities.put(AuditLogType.VM_MEMORY_UNDER_GUARANTEED_VALUE,
AuditLogSeverity.WARNING);
Should be an error, since the VM is swapping.
Line 509: severities.put(AuditLogType.USER_RUN_VM,
AuditLogSeverity.NORMAL);
Line 510: severities.put(AuditLogType.USER_RUN_VM_AS_STATELESS,
AuditLogSeverity.NORMAL);
Line 511: severities.put(AuditLogType.USER_FAILED_RUN_VM,
AuditLogSeverity.ERROR);
Line 512:
severities.put(AuditLogType.USER_RUN_VM_AS_STATELESS_FINISHED_FAILURE,
AuditLogSeverity.ERROR);
....................................................
File
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
Line 1309: VM savedVm =
_vmDict.get(vmInternalData.getVmDynamic().getId());
Line 1310: if (vmInternalData.getVmStatistics().getCurrentMemory()
!= null &&
Line 1311: savedVm.getMinAllocatedMem() >
vmInternalData.getVmStatistics().getCurrentMemory()) {
Line 1312: AuditLogableBase auditLogable = new
AuditLogableBase();
Line 1313: auditLogable.setVmId(savedVm.getId());
Please add current memory amount.
Also, before checking '>' please check getCurrentMemory is not zero or null.
Line 1314: AuditLogDirector.log(auditLogable,
AuditLogType.VM_MEMORY_UNDER_GUARANTEED_VALUE);
Line 1315: }
Line 1316:
Line 1317: }
Line 1310: if (vmInternalData.getVmStatistics().getCurrentMemory()
!= null &&
Line 1311: savedVm.getMinAllocatedMem() >
vmInternalData.getVmStatistics().getCurrentMemory()) {
Line 1312: AuditLogableBase auditLogable = new
AuditLogableBase();
Line 1313: auditLogable.setVmId(savedVm.getId());
Line 1314: AuditLogDirector.log(auditLogable,
AuditLogType.VM_MEMORY_UNDER_GUARANTEED_VALUE);
Arik, I'd settle with showing the current amount of memory.
But good point.
Line 1315: }
Line 1316:
Line 1317: }
Line 1318: }
--
To view, visit http://gerrit.ovirt.org/16949
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I47d32f291f39f0ab51c4e5d20a34ab01b47db562
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Noam Slomianko <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Noam Slomianko <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches