Francesco Romani has uploaded a new change for review. Change subject: migration: return plain response on error ......................................................................
migration: return plain response on error We should add extra status fields only when migration is OK (either doing OK or completed OK). It makes no sense to do that on error, as the fields are meaningless. TODO: make sure there aren't legacy constraints and Engine unexpectedly relies on those fields being present on error. In that case I'll mark them REQUIRED_FOR in the error path and leave them alone until 4.0 Change-Id: Ifafa5de4db317ed0e2f735eca6d944042e19c4e1 Signed-off-by: Francesco Romani <[email protected]> --- M vdsm/virt/migration.py 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/99/42799/1 diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py index 6ea4357..8cdfc10 100644 --- a/vdsm/virt/migration.py +++ b/vdsm/virt/migration.py @@ -111,12 +111,12 @@ if self._last_error is None: res = utils.picklecopy(self._last_status) + + self._updateStatus() + + return self._addMigrationFields(res) else: - res = utils.picklecopy(self._last_error) - - self._updateStatus() - - return self._addMigrationFields(res) + return utils.picklecopy(self._last_error) def _updateStatus(self): if self._monitorThread is not None: -- To view, visit https://gerrit.ovirt.org/42799 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ifafa5de4db317ed0e2f735eca6d944042e19c4e1 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
