Change in vdsm[master]: BZ#744704 - Fix rollback support for complex tasks
danken at redhat.com
danken at redhat.com
Thu Nov 10 09:52:22 UTC 2011
Dan Kenigsberg has posted comments on this change.
Change subject: BZ#744704 - Fix rollback support for complex tasks
......................................................................
Patch Set 4: (3 inline comments)
I wouldn't have nacked it for English, it is the exception that worries me most.
....................................................
File vdsm/storage/blockVolume.py
Line 185: else:
Line 186: # should stay %d and size should be int(size)
Line 187: volsize = "%s" % (size / 2 / 1024)
Line 188:
Line 189: # Stub rollback, just to mark the start of the task
you still refuse to call it a sentinel in the comment ;-)
Line 190: vars.task.pushRecovery(task.Recovery(task.SENTINEL_ROLLBACK, "blockVolume", "BlockVolume", "startCreateVolumeRollback",
Line 191: [sdUUID, imgUUID, volUUID]))
Line 192: # create volume rollback
Line 193: vars.task.pushRecovery(task.Recovery("halfbaked volume rollback", "blockVolume", "BlockVolume", "halfbakedVolumeRollback",
....................................................
File vdsm/storage/task.py
Line 73: FIELD_SEP = ","
Line 74: RESOURCE_SEP = "!"
Line 75: TASK_METADATA_VERSION = 1
Line 76:
Line 77: SENTINEL_ROLLBACK = "sentinel rollback"
I think better English would be ROLLBACK_SENTINEL
Line 78:
Line 79: class State:
Line 80: unknown = "unknown"
Line 81: init = "init"
Line 1057: try:
Line 1058: while (rec.name != SENTINEL_ROLLBACK):
Line 1059: rec = self.popRecovery()
Line 1060: self.recoveries.append(recovery)
Line 1061: except Exception:
would Eduardo allow that?
Which exceptions are expected? shouldn't we log them?
Line 1062: self.recoveries = [recovery]
Line 1063: self.persist()
Line 1064:
Line 1065:
--
To view, visit http://gerrit.usersys.redhat.com/1041
To unsubscribe, visit http://gerrit.usersys.redhat.com/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie36ac02475f3f6438a63fbcbd26730862216cebd
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Igor Lvovsky <ilvovsky at redhat.com>
Gerrit-Reviewer: Ayal Baron
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
More information about the vdsm-patches
mailing list