Liron Ar has posted comments on this change.
Change subject: core: remove memory image on remove snapshot
......................................................................
Patch Set 20: (4 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveSnapshotCommand.java
Line 128: * volumes should be removed only if the only snapshot that
points to them is removed
Line 129: */
Line 130: private boolean shouldRemoveMemorySnapshotVolumes(String
memoryVolume) {
Line 131: return !memoryVolume.isEmpty() &&
Line 132:
getSnapshotDao().getNumOfSnapshotsByMemory(memoryVolume) == 1;
how can we have few snapshots with the same memory volume?
Line 133: }
Line 134:
Line 135: private void removeMemory(final Snapshot snapshot) {
Line 136: List<Guid> guids =
GuidUtils.getGuidListFromString(snapshot.getMemoryVolume());
Line 143: @Override
Line 144: public boolean eval(Disk disk) {
Line 145: return disk.isWipeAfterDelete();
Line 146: }
Line 147: }).size() > 0;
can you please explain how having a disk with post zero is related to the
deletion of the memory volume?
Line 148:
Line 149: // delete first image
Line 150: // the next 'DeleteImageGroup' command should also take care
of the
Line 151: // image removal:
Line 152: VDSReturnValue vdsRetValue = runVdsCommand(
Line 153: VDSCommandType.DeleteImageGroup,
Line 154: new
DeleteImageGroupVDSCommandParameters(guids.get(1), guids.get(0), guids.get(2),
Line 155: postZero, false,
getVm().getVdsGroupCompatibilityVersion().toString()));
Line 156:
it will throw an exception in case of failure.
Line 157: if (!vdsRetValue.getSucceeded()) {
Line 158: log.errorFormat("Cannot remove memory dump volume for
snapshot {0}", snapshot.getId());
Line 159: }
Line 160: else {
Line 168: vdsRetValue = runVdsCommand(
Line 169: VDSCommandType.DeleteImageGroup,
Line 170: new
DeleteImageGroupVDSCommandParameters(guids.get(1), guids.get(0), guids.get(4),
Line 171: postZero, false,
getVm().getVdsGroupCompatibilityVersion().toString()));
Line 172:
it will throw an exception in case of failure.
Line 173: if (!vdsRetValue.getSucceeded()) {
Line 174: log.errorFormat("Cannot remove memory metadata volume for
snapshot {0}", snapshot.getId());
Line 175: }
Line 176: else {
--
To view, visit http://gerrit.ovirt.org/14687
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I88a707457b3b1565a887e141d18d9d08a2dbcc69
Gerrit-PatchSet: 20
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]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches