Arik Hadas has posted comments on this change.
Change subject: core: save memory state on live snapshot with memory
......................................................................
Patch Set 17: (7 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommand.java
Line 128: setSucceeded(true);
Line 129: }
Line 130:
Line 131: @Override
Line 132: public NGuid getStorageDomainId() {
Done
Line 133: if (cachedStorageDomainId.equals(Guid.Empty) && getVm() !=
null) {
Line 134: long sizeNeeded = getVm().getTotalMemorySizeInBytes() /
BYTES_IN_GB;
Line 135: StorageDomain storageDomain =
VmHandler.findStorageDomainForMemory(getVm().getStoragePoolId(), sizeNeeded);
Line 136: if (storageDomain != null) {
Line 222:
Line 223: VDSReturnValue vdsRetValue1 = runVdsCommand(
Line 224: VDSCommandType.DeleteImageGroup,
Line 225: new
DeleteImageGroupVDSCommandParameters(guids[1], guids[0], guids[2],
Line 226: false, false,
getVm().getVdsGroupCompatibilityVersion().toString()));
I replaced the code that was changed later
Line 227:
Line 228: if (!vdsRetValue1.getSucceeded()) {
Line 229: // log..
Line 230: }
Line 391: return false;
Line 392: }
Line 393: }
Line 394:
Line 395: if (getStorageDomainId().equals(Guid.Empty)) {
Done
Line 396: return
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_NO_SUITABLE_DOMAIN_FOUND);
Line 397: }
Line 398:
Line 399: return true;
Line 524: VDSReturnValue retVal =
Line 525: Backend
Line 526: .getInstance()
Line 527: .getResourceManager()
Line 528: .RunVdsCommand(
I separated the inner classes to separate files. but I don't understand how to
run the commands using runVdsCommand (it's protected, so I'll need to add it to
the TaskHandlerCommand as well - is it really necessary?)
Line 529: VDSCommandType.CreateImage,
Line 530: new
CreateImageVDSCommandParameters(getVm().getStoragePoolId(),
Line 531: getStorageDomainId()
Line 532: .getValue(),
Line 540: .toString()));
Line 541:
Line 542: if (!retVal.getSucceeded()) {
Line 543: throw new
VdcBLLException(VdcBllErrors.VolumeCreationError,
Line 544:
"CreateAllSnapshotsFromVmCommand::executeVmCommand: Failed to create image for
vm configuration!");
Done
Line 545: }
Line 546:
Line 547: Guid guid = createTask(retVal.getCreationInfo(),
VdcActionType.CreateAllSnapshotsFromVm);
Line 548: getTaskIdList().add(guid);
Line 567:
getStoragePool().getcompatibility_version().toString()));
Line 568:
Line 569: if (!retVal.getSucceeded()) {
Line 570: throw new
VdcBLLException(VdcBllErrors.VolumeCreationError,
Line 571:
"CreateAllSnapshotsFromVmCommand::executeVmCommand: Failed to create image for
memory!");
Done (I would love to be in Rome though..)
Line 572: }
Line 573:
Line 574: Guid guid =
Line 575: createTask(retVal.getCreationInfo(),
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HibernateVmCommand.java
Line 38: public class HibernateVmCommand<T extends HibernateVmParameters>
extends VmOperationCommandBase<T> {
Line 39: private boolean isHibernateVdsProblematic = false;
Line 40:
Line 41: /** Meta data size for allocation in bytes */
Line 42: public static final long META_DATA_SIZE_IN_BYTES = 10 * 1024;
changed the comment to describe it better
Line 43:
Line 44: /**
Line 45: * Constructor for command creation when compensation is applied
on startup
Line 46: *
--
To view, visit http://gerrit.ovirt.org/14291
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ifbb28efda1b63e506233a88399488a256e6ab1c8
Gerrit-PatchSet: 17
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches