Francesco Romani has uploaded a new change for review. Change subject: vm: stats: do not send empty disks/networks ......................................................................
vm: stats: do not send empty disks/networks VDSM used to inconditionally add keys for disks and networks in the stats value to be returned on Vm.getStats() API. If stats from libvirt are available, those keys will be overwritten with real data; otherwise, empty values are reported. If we use the same code path to piggyback data on vm_status events, this will confuse Engine and will make it believe there are no disks nor networks. Moreovero, in general, we should avoid to report empty values if the emptiness carries no meaning (noteworthy counterexample: vmJobs for live merge). So this patch makes sure that we report either full data for disks and networks, or nothing at all, avoiding empty values. Change-Id: I30aac0079fec71b496d4db9536b65d8f16360d7a Signed-off-by: Francesco Romani <from...@redhat.com> --- M vdsm/virt/vm.py 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/64/43464/1 diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index ffe2cba..fb2819d 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -1369,8 +1369,8 @@ 'monitorResponse': str(self._monitorResponse), 'timeOffset': self.conf.get('timeOffset', '0'), 'clientIp': self.conf.get('clientIp', ''), - 'network': {}, - 'disks': {}} + } + if 'pauseCode' in self.conf: stats['pauseCode'] = self.conf['pauseCode'] if self.isMigrating(): -- To view, visit https://gerrit.ovirt.org/43464 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I30aac0079fec71b496d4db9536b65d8f16360d7a 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