Arik Hadas has posted comments on this change.

Change subject: core: save memory state on live snapshot with memory
......................................................................


Patch Set 8: (7 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 (copied from hibernate command as is)
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;
responded in next patch-set
Line 136:             StorageDomain storageDomain = 
VmHandler.findStorageDomainForMemory(getVm().getStoragePoolId(), sizeNeeded);
Line 137:             if (storageDomain != null) {
Line 138:                 _storageDomainId = storageDomain.getId();
Line 139:             }


Line 226:                                 new 
DeleteImageGroupVDSCommandParameters(guids[1], guids[0], guids[2],
Line 227:                                         false, false, 
getVm().getVdsGroupCompatibilityVersion().toString()));
Line 228: 
Line 229:                         if (!vdsRetValue1.getSucceeded()) {
Line 230:                             // log..
responded in next patch-set
Line 231:                         }
Line 232:                     }
Line 233:                 } else {
Line 234:                     revertToActiveSnapshot(createdSnapshot.getId());


Line 231:                         }
Line 232:                     }
Line 233:                 } else {
Line 234:                     revertToActiveSnapshot(createdSnapshot.getId());
Line 235:                     // TODO: remove the memory image if exists
responded in next patch-set
Line 236:                 }
Line 237: 
Line 238:                 incrementVmGeneration();
Line 239: 


Line 478: 
Line 479:         return list;
Line 480:     }
Line 481: 
Line 482:     private interface MemoryImageBuilder {
responded in next patch-set
Line 483:         void build();
Line 484:         String getVolumeStringRepresentation();
Line 485:     }
Line 486: 


Line 546:                                     storagePoolId,
Line 547:                                     storageDomainId,
Line 548:                                     imageGroupId,
Line 549:                                     
getVm().getTotalMemorySizeInBytes(),
Line 550:                                     VolumeType.Preallocated,
responded in next patch-set
Line 551:                                     VolumeFormat.RAW,
Line 552:                                     volumeId,
Line 553:                                     "",
Line 554:                                     
getStoragePool().getcompatibility_version().toString()));


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HibernateVmCommand.java
Line 374:      * Returns the meta data that should be allocated when saving 
state of image.
Line 375:      *
Line 376:      * @return - Meta data size for allocation in bytes.
Line 377:      */
Line 378:     static long getMetaDataSizeInBytes() {
responded in next patch-set
Line 379:         return (long) 10 * 1024;
Line 380:     }
Line 381: 
Line 382:     private static Log log = 
LogFactory.getLog(HibernateVmCommand.class);


--
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: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to