Arik Hadas has posted comments on this change.
Change subject: core: [WIP] save memory state on live snapshot with memory
......................................................................
Patch Set 7: (6 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommand.java
Line 126: }
Line 127: setSucceeded(true);
Line 128: }
Line 129:
Line 130: private Guid _storageDomainId = Guid.Empty;
Done
Line 131:
Line 132: @Override
Line 133: public NGuid getStorageDomainId() {
Line 134: if (_storageDomainId.equals(Guid.Empty) && getVm() != null) {
Line 131:
Line 132: @Override
Line 133: public NGuid getStorageDomainId() {
Line 134: if (_storageDomainId.equals(Guid.Empty) && getVm() != null) {
Line 135: long sizeNeeded = getVm().getTotalMemorySizeInBytes() /
BYTES_IN_GB;
the calculation here is so wrong - we can "miss" 1[GB]-1[byte] so this 10[KB]
is not that relevant is it?..
Line 136: StorageDomain storageDomain =
VmHandler.findStorageDomainForMemory(getVm().getStoragePoolId(), sizeNeeded);
Line 137: if (storageDomain != null) {
Line 138: _storageDomainId = storageDomain.getId();
Line 139: }
Line 311: if
(FeatureSupported.memorySnapshot(ClusterUtils.getCompatilibilyVersion(getVm())))
{
Line 312: return new
SnapshotVDSCommandParameters(getVm().getRunOnVds().getValue(),
Line 313: getVm().getId(),
Line 314: ImagesHandler.filterImageDisks(pluggedDisks,
false, true),
Line 315: snapshot.getMemoryVolume());
NullableMemoryImageBuilder will be used -> the memory volume in the snapshot
will be empty
Line 316: }
Line 317: else {
Line 318: return new
SnapshotVDSCommandParameters(getVm().getRunOnVds().getValue(),
Line 319: getVm().getId(),
Line 465: private Guid storagePoolId;
Line 466: private Guid imageGroupId;
Line 467: private Guid volumeId;
Line 468: private Guid imageGroupId2;
Line 469: private Guid volumeId2;
Done
used different names to be consistent with other places in the code
Line 470:
Line 471: private DefaultMemoryImageBuilder() {
Line 472: this.storageDomainId = getStorageDomainId().getValue();
Line 473: this.storagePoolId = getVm().getStoragePoolId();
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HibernateVmCommand.java
Line 378: static long getMetaDataSizeInBytes() {
Line 379: return (long) 10 * 1024;
Line 380: }
Line 381:
Line 382: private static Log log =
LogFactory.getLog(HibernateVmCommand.class);
right, I prefer not to do it as part of this feature
....................................................
File
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/SnapshotDaoDbFacadeImpl.java
Line 85: parameterSource);
Line 86: }
Line 87:
Line 88: @Override
Line 89: public Snapshot get(Guid vmId, SnapshotType type, SnapshotStatus
status) {
Done
Line 90: MapSqlParameterSource parameterSource =
getCustomMapSqlParameterSource()
Line 91: .addValue("vm_id", vmId)
Line 92: .addValue("snapshot_type", EnumUtils.nameOrNull(type))
Line 93: .addValue("status", EnumUtils.nameOrNull(status));
--
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: 7
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: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches