Francesco Romani has posted comments on this change. Change subject: Getting migration statistics NPE ......................................................................
Patch Set 2: (1 comment) https://gerrit.ovirt.org/#/c/40657/2/vdsm/virt/vm.py File vdsm/virt/vm.py: Line 1299: if 'pauseCode' in self.conf: Line 1300: stats['pauseCode'] = self.conf['pauseCode'] Line 1301: if self.isMigrating(): Line 1302: mig_status = self.migrateStatus() Line 1303: if 'progress' in mig_status: > By returning 0 if no progress? Yes, Michal's suggestion is the best course of action. I'm just not sure we want to rebase this change on top of this cleanup. For the cleanup itself, code should: - make sure the reported progress is monotonically increasing (NEVER go backwards) - return 0 if no migration is started - return the value from libvirt (but see above) if migration is in progress - return 100 after the migration finished also, the 'progress' field should probably moved away from the 'SourceThread.status' dict. Not sure if this move makes the cleanup easier or harder Please note that I've already some related cleanups piled on https://gerrit.ovirt.org/#/q/status:open+project:vdsm+branch:master+topic:cleanup_migration - we may want to build on that (or not!) Line 1304: stats['migrationProgress'] = mig_status['progress'] Line 1305: Line 1306: decStats = {} Line 1307: try: -- 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: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Shahar Havivi <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Michal Skrivanek <[email protected]> Gerrit-Reviewer: Shahar Havivi <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
