Martin Sivák has uploaded a new change for review. Change subject: Support ioTune values >2^31 in getStats over xml-rpc ......................................................................
Support ioTune values >2^31 in getStats over xml-rpc This fixes issue with getStats over xml-rpc when ioTune value is accidentally increased beyond cca 2e9 (2GB per second). Change-Id: If5005d7fdc5397df2480fa8d0c15b003a52e8626 Signed-off-by: Martin Sivak <[email protected]> --- M vdsm/virt/vm.py 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/15/30215/1 diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index cd0837b..7aec2af 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -2844,7 +2844,14 @@ except Exception: self.log.error("Error fetching vm stats", exc_info=True) for var in decStats: - if type(decStats[var]) is not dict: + if var == "ioTune": + # Convert ioTune numbers to strings to avoid xml-rpc issue + # with numbers bigger than int32_t + for ioTune in decStats["ioTune"]: + ioTune["ioTune"] = dict((k, utils.convertToStr(v)) + for k, v in ioTune["ioTune"].iteritems()) + stats[var] = decStats[var] + elif type(decStats[var]) is not dict: stats[var] = utils.convertToStr(decStats[var]) elif var in ('network', 'balloonInfo', 'vmJobs', 'vNodeRuntimeInfo'): -- To view, visit http://gerrit.ovirt.org/30215 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If5005d7fdc5397df2480fa8d0c15b003a52e8626 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Sivák <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
