Change in vdsm[ovirt-3.3]: Migration cancellation replies wrong message format

vfeenstr at redhat.com vfeenstr at redhat.com
Tue Nov 26 11:05:44 UTC 2013


Hello Dan Kenigsberg, Michal Skrivanek,

I'd like you to do a code review.  Please visit

    http://gerrit.ovirt.org/21700

to review the following change.

Change subject: Migration cancellation replies wrong message format
......................................................................

Migration cancellation replies wrong message format

The message currently returns:

{'status': {'message': 'Migration canceled',
            'code': { 'status': { 'message': 'Migration not in progress',
                      'code': 47}}},
            'progress': 1}

The content of code is wrong. This commit fixes it so the message will
look like this:

{'status': {'message': 'Migration canceled', 'code': 47}, 'progress': 1}

Change-Id: I17a2463154e9f67191a818f137a4e7158a74dbbb
Bug-Url: https://bugzilla.redhat.com/1015887
Signed-off-by: Vinzenz Feenstra <vfeenstr at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/21250
Reviewed-by: Michal Skrivanek <michal.skrivanek at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M vdsm/vm.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/00/21700/1

diff --git a/vdsm/vm.py b/vdsm/vm.py
index f2971fe..22d7a2d 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -324,7 +324,8 @@
                 self._finishSuccessfully()
             except libvirt.libvirtError as e:
                 if e.get_error_code() == libvirt.VIR_ERR_OPERATION_ABORTED:
-                    self.status['status']['code'] = errCode['migCancelErr']
+                    self.status['status']['code'] = \
+                        errCode['migCancelErr']['status']['code']
                     self.status['status']['message'] = 'Migration canceled'
                 raise
             finally:


-- 
To view, visit http://gerrit.ovirt.org/21700
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17a2463154e9f67191a818f137a4e7158a74dbbb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>


More information about the vdsm-patches mailing list