Hello Yaniv Bronhaim, Ondřej Svoboda, Antoni Segura Puimedon,
I'd like you to do a code review. Please visit
to review the following change.
Change subject: vm iface statistics: never report negative rates ......................................................................
vm iface statistics: never report negative rates
When Linux tx/rx couters overflow their 32 bit limit, they wrap back to zero. This causes our reported rxRate/txRate to become negative for one nample. 51073875161d9b932b7
Bug-Url: https://bugzilla.redhat.com/1062166 Change-Id: I40daeb12172a7f54f135b3018405ef228983fa93 Signed-off-by: Dan Kenigsberg danken@redhat.com Reviewed-on: http://gerrit.ovirt.org/23598 Tested-by: Ondřej Svoboda osvoboda@redhat.com Reviewed-on: http://gerrit.ovirt.org/24152 Reviewed-by: Antoni Segura Puimedon asegurap@redhat.com Reviewed-by: Yaniv Bronhaim ybronhei@redhat.com --- M vdsm/vm.py 1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/22/24322/1
diff --git a/vdsm/vm.py b/vdsm/vm.py index bb35f0e..3534699 100644 --- a/vdsm/vm.py +++ b/vdsm/vm.py @@ -616,10 +616,12 @@ ifStats['txDropped'] = str(eInfo[nic.name][7])
ifRxBytes = (100.0 * - (eInfo[nic.name][0] - sInfo[nic.name][0]) / + (eInfo[nic.name][0] - sInfo[nic.name][0]) % + 2 ** 32 / sampleInterval / ifSpeed / self.MBPS_TO_BPS) ifTxBytes = (100.0 * - (eInfo[nic.name][4] - sInfo[nic.name][4]) / + (eInfo[nic.name][4] - sInfo[nic.name][4]) % + 2 ** 32 / sampleInterval / ifSpeed / self.MBPS_TO_BPS)
ifStats['rxRate'] = '%.1f' % ifRxBytes
Yaniv Bronhaim has posted comments on this change.
Change subject: vm iface statistics: never report negative rates ......................................................................
Patch Set 1: Code-Review+2
Yaniv Bronhaim has posted comments on this change.
Change subject: vm iface statistics: never report negative rates ......................................................................
Patch Set 1: Code-Review-1
the bz is targeted to 3.4. open 3.3 bug
Dan Kenigsberg has posted comments on this change.
Change subject: vm iface statistics: never report negative rates ......................................................................
Patch Set 2: Verified+1
Dan Kenigsberg has posted comments on this change.
Change subject: vm iface statistics: never report negative rates ......................................................................
Patch Set 2:
New bug cloned.
Yaniv Bronhaim has posted comments on this change.
Change subject: vm iface statistics: never report negative rates ......................................................................
Patch Set 2: Code-Review+2
Yaniv Bronhaim has posted comments on this change.
Change subject: vm iface statistics: never report negative rates ......................................................................
Patch Set 2: Code-Review-1
the target release should be 3.3 for ovirt-3.3 backport
Dan Kenigsberg has posted comments on this change.
Change subject: vm iface statistics: never report negative rates ......................................................................
Patch Set 2: Code-Review+1
Yaniv, I see no problem with the target release of https://bugzilla.redhat.com/show_bug.cgi?id=1064489 (3.3.4)
Yaniv Bronhaim has posted comments on this change.
Change subject: vm iface statistics: never report negative rates ......................................................................
Patch Set 2: Code-Review+2
Yaniv Bronhaim has submitted this change and it was merged.
Change subject: vm iface statistics: never report negative rates ......................................................................
vm iface statistics: never report negative rates
When Linux tx/rx couters overflow their 32 bit limit, they wrap back to zero. This causes our reported rxRate/txRate to become negative for one nample. 51073875161d9b932b7
Bug-Url: https://bugzilla.redhat.com/1064489 Change-Id: I40daeb12172a7f54f135b3018405ef228983fa93 Signed-off-by: Dan Kenigsberg danken@redhat.com Reviewed-on: http://gerrit.ovirt.org/23598 Tested-by: Ondřej Svoboda osvoboda@redhat.com Reviewed-on: http://gerrit.ovirt.org/24152 Reviewed-by: Antoni Segura Puimedon asegurap@redhat.com Reviewed-by: Yaniv Bronhaim ybronhei@redhat.com Reviewed-on: http://gerrit.ovirt.org/24322 --- M vdsm/vm.py 1 file changed, 4 insertions(+), 2 deletions(-)
Approvals: Yaniv Bronhaim: Looks good to me, approved Dan Kenigsberg: Verified; Looks good to me, but someone else must approve
vdsm-patches@lists.fedorahosted.org