Hello Ayal Baron, Bala.FA, Saggi Mizrahi, Dan Kenigsberg,

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

    http://gerrit.ovirt.org/19863

to review the following change.

Change subject: gluster: fix integer overflow error in rebalance status
......................................................................

gluster: fix integer overflow error in rebalance status

Provides rebalance status values as strings to avoid overflow error
when a rebalance status values exceeds the XML-RPC limits

For more info: https://bugzilla.redhat.com/show_bug.cgi?id=1012393

Change-Id: Iec44c47268318bcc105c00c2de0cf483012d3723
Signed-off-by: Timothy Asir <tjeya...@redhat.com>
---
M vdsm/gluster/cli.py
1 file changed, 10 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/63/19863/1

diff --git a/vdsm/gluster/cli.py b/vdsm/gluster/cli.py
index 62b5f13..f9d6404 100644
--- a/vdsm/gluster/cli.py
+++ b/vdsm/gluster/cli.py
@@ -610,21 +610,21 @@
 
     status = {
         'summary': {
-            'filesScanned': int(tree.find('aggregate/lookups').text),
-            'filesMoved': int(tree.find('aggregate/files').text),
-            'filesFailed': int(tree.find('aggregate/failures').text),
-            'filesSkipped': int(tree.find('aggregate/failures').text),
-            'totalSizeMoved': int(tree.find('aggregate/size').text),
+            'filesScanned': tree.find('aggregate/lookups').text,
+            'filesMoved': tree.find('aggregate/files').text,
+            'filesFailed': tree.find('aggregate/failures').text,
+            'filesSkipped': tree.find('aggregate/failures').text,
+            'totalSizeMoved': tree.find('aggregate/size').text,
             'status': tree.find('aggregate/statusStr').text.upper()},
         'hosts': []}
 
     for el in tree.findall('node'):
         status['hosts'].append({'name': el.find('nodeName').text,
-                                'filesScanned': int(el.find('lookups').text),
-                                'filesMoved': int(el.find('files').text),
-                                'filesFailed': int(el.find('failures').text),
-                                'filesSkipped': int(el.find('failures').text),
-                                'totalSizeMoved': int(el.find('size').text),
+                                'filesScanned': el.find('lookups').text,
+                                'filesMoved': el.find('files').text,
+                                'filesFailed': el.find('failures').text,
+                                'filesSkipped': el.find('failures').text,
+                                'totalSizeMoved': el.find('size').text,
                                 'status': el.find('statusStr').text.upper()})
 
     return status


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec44c47268318bcc105c00c2de0cf483012d3723
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Timothy Asir <tjeya...@redhat.com>
Gerrit-Reviewer: Ayal Baron <aba...@redhat.com>
Gerrit-Reviewer: Bala.FA <barum...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizr...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to