Change in vdsm[master]: Prevent KeyError in migrateStatus
fromani at redhat.com
fromani at redhat.com
Mon May 18 10:03:50 UTC 2015
Francesco Romani has posted comments on this change.
Change subject: Prevent KeyError in migrateStatus
......................................................................
Patch Set 4: Code-Review-1
(3 comments)
seems ok. Let's do some minor cleanups before the final merge.
-1 only for visibility.
Also, please briefly state how you verified the change. It is required by the process.
https://gerrit.ovirt.org/#/c/40657/4//COMMIT_MSG
Commit Message:
Line 3: AuthorDate: 2015-05-07 14:18:18 +0300
Line 4: Commit: Shahar Havivi <shavivi at redhat.com>
Line 5: CommitDate: 2015-05-13 06:57:10 -0400
Line 6:
Line 7: Prevent KeyError in migrateStatus
please change like:
migration: prevent...
Line 8:
Line 9: MigrateStats only return progress when monitor thread is alive,
Line 10: When calling MigrateStats after the thread is dead we get KeyError.
Line 11: (when calling getMigrationStatus verb)
https://gerrit.ovirt.org/#/c/40657/4/vdsm/virt/migration.py
File vdsm/virt/migration.py:
Line 79: self.status = {
Line 80: 'status': {
Line 81: 'code': 0,
Line 82: 'message': 'Migration in progress'},
Line 83: 'progress': 0}
if you add a new 'progress attribute', you can remove the key from here
Line 84: self.progress = 0
Line 85: threading.Thread.__init__(self)
Line 86: self._preparingMigrationEvt = True
Line 87: self._migrationCanceledEvt = False
Line 80: 'status': {
Line 81: 'code': 0,
Line 82: 'message': 'Migration in progress'},
Line 83: 'progress': 0}
Line 84: self.progress = 0
please make _private
Line 85: threading.Thread.__init__(self)
Line 86: self._preparingMigrationEvt = True
Line 87: self._migrationCanceledEvt = False
Line 88: self._monitorThread = None
--
To view, visit https://gerrit.ovirt.org/40657
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I9277b70432d1d9ecc3c39ee7deabbbd89d179715
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michal Skrivanek <mskrivan at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list