Francesco Romani has uploaded a new change for review. Change subject: API: honor onlyUUID only if short status is asked ......................................................................
API: honor onlyUUID only if short status is asked this patch makes the 'onlyUUID' parameter take effect only if 'fullStatus' equals False (short status was asked). The 'onlyUUID' parameter was added to preserve backward compatibility for Engines 3.5.x, but it is about short status (fullStatus=False), and should not intervene anytime. Instead current code always used it, with the side effect that also fullStatus could be possibly stripped. XMLRPC and JSONRPC Bindings made sure Engine was not affected by that, but MOM does access API directly, so it was. When MOM receives stripped output from getVMList(fullStatus=True), it crashes with return response['vmList'][0]['pid'] TypeError: string indices must be integers in /var/vdsm/log/mom.log. The net effect of this bug is: - VDSM keeps running as usual - communications with Engine not affected - MOM crashes and its functionality is lost. Change-Id: Id05a1bb92100023e8a96ee6f13daa8eedd233ff6 Signed-off-by: Francesco Romani <from...@redhat.com> --- M vdsm/API.py 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/79/38679/1 diff --git a/vdsm/API.py b/vdsm/API.py index ba99911..d4ff616 100644 --- a/vdsm/API.py +++ b/vdsm/API.py @@ -1386,9 +1386,10 @@ vmlist = [v.status(fullStatus) for v in self._cif.vmContainer.values() if not vmSet or v.id in vmSet] - if onlyUUID: + if not fullStatus and onlyUUID: # BZ 1196735: api backward compatibility issue # REQUIRED_FOR: engine-3.5.0 only + # REQUIRED_FOR: mom-0.4.3 vmlist = [v['vmId'] for v in vmlist] return {'status': doneCode, 'vmList': vmlist} -- To view, visit https://gerrit.ovirt.org/38679 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id05a1bb92100023e8a96ee6f13daa8eedd233ff6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <from...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches