Omer Frenkel has posted comments on this change. Change subject: backend: RNG device sources reporting ......................................................................
Patch Set 11: (3 comments) http://gerrit.ovirt.org/#/c/22258/11/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateRngDeviceCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateRngDeviceCommand.java: Line 32: if (!isRngSourceCompatibleWithCluster()) { Line 33: VmRngDevice device = getParameters().getRngDevice(); Line 34: Line 35: Backend.getInstance().runAction(VdcActionType.RemoveRngDevice, getParameters()); Line 36: addCustomValue("ErrorMessage", String.format("RNG Device id: %s of VM id: %s is no more compatible with cluster. Removing the device.", its not nice to log object id in the audit log, you can skip the device id, i guess, and log vm name, if you set the vm-id it will find the name automaitically (setVmId()) Line 37: device.getId(), device.getVmId())); Line 38: AuditLogDirector.log(this, AuditLogType.RNG_SOURCES_INCOMPATIBLE_WITH_CLUSTER); Line 39: } Line 40: Line 38: AuditLogDirector.log(this, AuditLogType.RNG_SOURCES_INCOMPATIBLE_WITH_CLUSTER); Line 39: } Line 40: Line 41: VmDevice rngDevice = getParameters().getRngDevice(); Line 42: getDbFacade().getVmDeviceDao().update(rngDevice); do we still want to update the device if we remove it? Line 43: setSucceeded(true); Line 44: } http://gerrit.ovirt.org/#/c/22258/11/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDAODbFacadeImpl.java File backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDAODbFacadeImpl.java: Line 345: entity.setHighlyAvailableIsConfigured(rs.getBoolean("ha_configured")); Line 346: entity.setHighlyAvailableIsActive(rs.getBoolean("ha_active")); Line 347: entity.setHighlyAvailableGlobalMaintenance(rs.getBoolean("ha_global_maintenance")); Line 348: entity.setHighlyAvailableLocalMaintenance(rs.getBoolean("ha_local_maintenance")); Line 349: entity.getSupportedRngSources().clear(); didnt we say its redundent to clear the list? Line 350: entity.getSupportedRngSources().addAll(VmRngDevice.csvToSourcesSet(rs.getString("supported_rng_sources"))); Line 351: entity.calculateFreeVirtualMemory(); Line 352: entity.setBootTime((Long) rs.getObject("boot_time")); Line 353: return entity; -- To view, visit http://gerrit.ovirt.org/22258 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id60a39118aef439146e6f0f308eec84e1ccaab9a Gerrit-PatchSet: 11 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Frank Kobzik <[email protected]> Gerrit-Reviewer: Arik Hadas <[email protected]> Gerrit-Reviewer: Frank Kobzik <[email protected]> Gerrit-Reviewer: Itamar Heim <[email protected]> Gerrit-Reviewer: Omer Frenkel <[email protected]> Gerrit-Reviewer: Roy Golan <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
