Change in vdsm[ovirt-3.4]: gluster: adopt xml changes of rebalance and remove-brick status

barumuga at redhat.com barumuga at redhat.com
Fri Jan 24 02:35:50 UTC 2014


Hello Timothy Asir, Saggi Mizrahi, Aravinda VK, Dan Kenigsberg, Darshan N,

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

    http://gerrit.ovirt.org/23649

to review the following change.

Change subject: gluster: adopt xml changes of rebalance and remove-brick status
......................................................................

gluster: adopt xml changes of rebalance and remove-brick status

xml output of rebalance and remove-brick status add host uuid and task
runtime (per host and summary).  This patch adopts these additional
elements below verbs

* glusterVolumeRebalanceStatus
* glusterVolumeRemoveBrickStatus

Below is the change in output which doesn't break backward
compatibility

        {'summary': {
    ==>>    'runtime': FLOAT,
            'filesScanned': INT,
            'filesMoved': INT,
            'filesFailed': INT,
            'filesSkipped': INT,
            'totalSizeMoved': INT,
            'status': STRING
        },
        'hosts': [{
            'name': STRING,
    ==>>    'id': STRING,
    ==>>    'runtime': FLOAT,
            'filesScanned': INT,
            'filesMoved': INT,
            'filesFailed': INT,
            'filesSkipped': INT,
            'totalSizeMoved': INT,
            'status': STRING
        }]}

Change-Id: I5866ff338768bd5162acc313eed132526b7777ef
Reviewed-on: http://gerrit.ovirt.org/19597
Reviewed-by: Timothy Asir <tjeyasin at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
Signed-off-by: Bala.FA <barumuga at redhat.com>
---
M tests/glusterTestData.py
M tests/glusterVolumeRebalanceStatus.xml
M tests/glusterVolumeRemoveBricksStatus.xml
M vdsm/gluster/cli.py
4 files changed, 22 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/49/23649/1

diff --git a/tests/glusterTestData.py b/tests/glusterTestData.py
index 5e0024b..7622f10 100644
--- a/tests/glusterTestData.py
+++ b/tests/glusterTestData.py
@@ -768,6 +768,7 @@
 
 REBALANCE_REMOVE_BRICK_STATUS = {
     'summary': {
+        'runtime': '10.2',
         'filesScanned': '278',
         'filesMoved': '78',
         'filesFailed': '0',
@@ -777,6 +778,8 @@
     },
     'hosts': [{
         'name': 'localhost',
+        'id': '883626f8-4d29-4d02-8c5d-c9f48c5b2445',
+        'runtime': '10.2',
         'filesScanned': '278',
         'filesMoved': '78',
         'filesFailed': '0',
diff --git a/tests/glusterVolumeRebalanceStatus.xml b/tests/glusterVolumeRebalanceStatus.xml
index 42968c5..41f5598 100644
--- a/tests/glusterVolumeRebalanceStatus.xml
+++ b/tests/glusterVolumeRebalanceStatus.xml
@@ -9,6 +9,8 @@
     <nodeCount>1</nodeCount>
     <node>
       <nodeName>localhost</nodeName>
+      <id>883626f8-4d29-4d02-8c5d-c9f48c5b2445</id>
+      <runtime>10.2</runtime>
       <files>78</files>
       <size>79872</size>
       <lookups>278</lookups>
@@ -18,6 +20,7 @@
       <statusStr>completed</statusStr>
     </node>
     <aggregate>
+      <runtime>10.2</runtime>
       <files>78</files>
       <size>79872</size>
       <lookups>278</lookups>
diff --git a/tests/glusterVolumeRemoveBricksStatus.xml b/tests/glusterVolumeRemoveBricksStatus.xml
index 26bb97c..eb7df91 100644
--- a/tests/glusterVolumeRemoveBricksStatus.xml
+++ b/tests/glusterVolumeRemoveBricksStatus.xml
@@ -7,6 +7,8 @@
     <nodeCount>1</nodeCount>
     <node>
       <nodeName>localhost</nodeName>
+      <id>883626f8-4d29-4d02-8c5d-c9f48c5b2445</id>
+      <runtime>10.2</runtime>
       <files>78</files>
       <size>79872</size>
       <lookups>278</lookups>
@@ -16,6 +18,7 @@
       <statusStr>completed</statusStr>
     </node>
     <aggregate>
+      <runtime>10.2</runtime>
       <files>78</files>
       <size>79872</size>
       <lookups>278</lookups>
diff --git a/vdsm/gluster/cli.py b/vdsm/gluster/cli.py
index 5a090c5..e3f7c84 100644
--- a/vdsm/gluster/cli.py
+++ b/vdsm/gluster/cli.py
@@ -618,13 +618,16 @@
 def _parseVolumeRebalanceRemoveBrickStatus(xmltree, mode):
     """
     returns {'hosts': [{'name': NAME,
-                       'filesScanned': INT AS STRING,
-                       'filesMoved': INT AS STRING,
-                       'filesFailed': INT AS STRING,
-                       'filesSkipped': INT AS STRING,
-                       'totalSizeMoved': INT AS STRING,
-                       'status': STRING},...]
-             'summary': {'filesScanned': INT AS STRING,
+                        'id': UUID_STRING,
+                        'runtime': FLOAT_AS_STRING,
+                        'filesScanned': INT AS STRING,
+                        'filesMoved': INT AS STRING,
+                        'filesFailed': INT AS STRING,
+                        'filesSkipped': INT AS STRING,
+                        'totalSizeMoved': INT AS STRING,
+                        'status': STRING},...]
+             'summary': {'runtime': FLOAT_AS_STRING,
+                         'filesScanned': INT AS STRING,
                          'filesMoved': INT AS STRING,
                          'filesFailed': INT AS STRING,
                          'filesSkipped': INT AS STRING,
@@ -640,6 +643,7 @@
 
     status = {
         'summary': {
+            'runtime': tree.find('aggregate/runtime').text,
             'filesScanned': tree.find('aggregate/lookups').text,
             'filesMoved': tree.find('aggregate/files').text,
             'filesFailed': tree.find('aggregate/failures').text,
@@ -650,6 +654,8 @@
 
     for el in tree.findall('node'):
         status['hosts'].append({'name': el.find('nodeName').text,
+                                'id': el.find('id').text,
+                                'runtime': el.find('runtime').text,
                                 'filesScanned': el.find('lookups').text,
                                 'filesMoved': el.find('files').text,
                                 'filesFailed': el.find('failures').text,


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5866ff338768bd5162acc313eed132526b7777ef
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Bala.FA <barumuga at redhat.com>
Gerrit-Reviewer: Aravinda VK <avishwan at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Darshan N <dnarayan at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin at redhat.com>


More information about the vdsm-patches mailing list