Change in vdsm[master]: Adopt the change in xml output format
barumuga at redhat.com
barumuga at redhat.com
Mon Nov 19 13:01:37 UTC 2012
Hello Ayal Baron, Timothy Asir, Saggi Mizrahi, Federico Simoncelli, Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/9323
to review the following change.
Change subject: Adopt the change in xml output format
......................................................................
Adopt the change in xml output format
'gluster volume status --xml' output added values under
<volumes/volume> levels. This change is taken up in the parsing.
Change-Id: Icfb5c622b369d4ecd1ee0010595bec25557fe0c2
Signed-off-by: Bala.FA <barumuga at redhat.com>
---
M tests/gluster_cli_tests.py
M vdsm/gluster/cli.py
M vdsm_cli/vdsClientGluster.py
3 files changed, 481 insertions(+), 464 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/23/9323/1
diff --git a/tests/gluster_cli_tests.py b/tests/gluster_cli_tests.py
index 2a2a4d3..1b57433 100644
--- a/tests/gluster_cli_tests.py
+++ b/tests/gluster_cli_tests.py
@@ -217,36 +217,40 @@
<opErrno>0</opErrno>
<opErrstr/>
<volStatus>
- <volName>music</volName>
- <nodeCount>4</nodeCount>
- <node>
- <hostname>192.168.122.2</hostname>
- <path>/tmp/music-b1</path>
- <port>49152</port>
- <status>1</status>
- <pid>1313</pid>
- </node>
- <node>
- <hostname>192.168.122.2</hostname>
- <path>/tmp/music-b2</path>
- <port>49153</port>
- <status>1</status>
- <pid>1335</pid>
- </node>
- <node>
- <hostname>NFS Server</hostname>
- <path>192.168.122.2</path>
- <port>38467</port>
- <status>1</status>
- <pid>1357</pid>
- </node>
- <node>
- <hostname>Self-heal Daemon</hostname>
- <path>192.168.122.2</path>
- <port>0</port>
- <status>1</status>
- <pid>1375</pid>
- </node>
+ <volumes>
+ <volume>
+ <volName>music</volName>
+ <nodeCount>4</nodeCount>
+ <node>
+ <hostname>192.168.122.2</hostname>
+ <path>/tmp/music-b1</path>
+ <port>49152</port>
+ <status>1</status>
+ <pid>1313</pid>
+ </node>
+ <node>
+ <hostname>192.168.122.2</hostname>
+ <path>/tmp/music-b2</path>
+ <port>49153</port>
+ <status>1</status>
+ <pid>1335</pid>
+ </node>
+ <node>
+ <hostname>NFS Server</hostname>
+ <path>192.168.122.2</path>
+ <port>38467</port>
+ <status>1</status>
+ <pid>1357</pid>
+ </node>
+ <node>
+ <hostname>Self-heal Daemon</hostname>
+ <path>192.168.122.2</path>
+ <port>0</port>
+ <status>1</status>
+ <pid>1375</pid>
+ </node>
+ </volume>
+ </volumes>
</volStatus>
</cliOutput>
"""
@@ -277,34 +281,38 @@
<opErrno>0</opErrno>
<opErrstr/>
<volStatus>
- <volName>music</volName>
- <nodeCount>2</nodeCount>
- <node>
- <hostname>192.168.122.2</hostname>
- <path>/tmp/music-b1</path>
- <port>49152</port>
- <status>1</status>
- <pid>1313</pid>
- <sizeTotal>8370712576</sizeTotal>
- <sizeFree>4478812160</sizeFree>
- <device>/dev/vda1</device>
- <blockSize>4096</blockSize>
- <mntOptions>rw,seclabel,relatime,data=ordered</mntOptions>
- <fsName>ext4</fsName>
- </node>
- <node>
- <hostname>192.168.122.2</hostname>
- <path>/tmp/music-b2</path>
- <port>49153</port>
- <status>1</status>
- <pid>1335</pid>
- <sizeTotal>8370712576</sizeTotal>
- <sizeFree>4478812160</sizeFree>
- <device>/dev/vda1</device>
- <blockSize>4096</blockSize>
- <mntOptions>rw,seclabel,relatime,data=ordered</mntOptions>
- <fsName>ext4</fsName>
- </node>
+ <volumes>
+ <volume>
+ <volName>music</volName>
+ <nodeCount>2</nodeCount>
+ <node>
+ <hostname>192.168.122.2</hostname>
+ <path>/tmp/music-b1</path>
+ <port>49152</port>
+ <status>1</status>
+ <pid>1313</pid>
+ <sizeTotal>8370712576</sizeTotal>
+ <sizeFree>4478812160</sizeFree>
+ <device>/dev/vda1</device>
+ <blockSize>4096</blockSize>
+ <mntOptions>rw,seclabel,relatime,data=ordered</mntOptions>
+ <fsName>ext4</fsName>
+ </node>
+ <node>
+ <hostname>192.168.122.2</hostname>
+ <path>/tmp/music-b2</path>
+ <port>49153</port>
+ <status>1</status>
+ <pid>1335</pid>
+ <sizeTotal>8370712576</sizeTotal>
+ <sizeFree>4478812160</sizeFree>
+ <device>/dev/vda1</device>
+ <blockSize>4096</blockSize>
+ <mntOptions>rw,seclabel,relatime,data=ordered</mntOptions>
+ <fsName>ext4</fsName>
+ </node>
+ </volume>
+ </volumes>
</volStatus>
</cliOutput>"""
tree = etree.fromstring(out)
@@ -334,48 +342,52 @@
<opErrno>0</opErrno>
<opErrstr/>
<volStatus>
- <volName>music</volName>
- <nodeCount>2</nodeCount>
- <node>
- <hostname>192.168.122.2</hostname>
- <path>/tmp/music-b1</path>
- <port>49152</port>
- <status>1</status>
- <pid>1313</pid>
- <clientsStatus>
- <clientCount>2</clientCount>
- <client>
- <hostname>192.168.122.2:1021</hostname>
- <bytesRead>1172</bytesRead>
- <bytesWrite>792</bytesWrite>
- </client>
- <client>
- <hostname>192.168.122.2:1011</hostname>
- <bytesRead>10076</bytesRead>
- <bytesWrite>12152</bytesWrite>
- </client>
- </clientsStatus>
- </node>
- <node>
- <hostname>192.168.122.2</hostname>
- <path>/tmp/music-b2</path>
- <port>49153</port>
- <status>1</status>
- <pid>1335</pid>
- <clientsStatus>
- <clientCount>2</clientCount>
- <client>
- <hostname>192.168.122.2:1020</hostname>
- <bytesRead>1172</bytesRead>
- <bytesWrite>792</bytesWrite>
- </client>
- <client>
- <hostname>192.168.122.2:1010</hostname>
- <bytesRead>10864</bytesRead>
- <bytesWrite>12816</bytesWrite>
- </client>
- </clientsStatus>
- </node>
+ <volumes>
+ <volume>
+ <volName>music</volName>
+ <nodeCount>2</nodeCount>
+ <node>
+ <hostname>192.168.122.2</hostname>
+ <path>/tmp/music-b1</path>
+ <port>49152</port>
+ <status>1</status>
+ <pid>1313</pid>
+ <clientsStatus>
+ <clientCount>2</clientCount>
+ <client>
+ <hostname>192.168.122.2:1021</hostname>
+ <bytesRead>1172</bytesRead>
+ <bytesWrite>792</bytesWrite>
+ </client>
+ <client>
+ <hostname>192.168.122.2:1011</hostname>
+ <bytesRead>10076</bytesRead>
+ <bytesWrite>12152</bytesWrite>
+ </client>
+ </clientsStatus>
+ </node>
+ <node>
+ <hostname>192.168.122.2</hostname>
+ <path>/tmp/music-b2</path>
+ <port>49153</port>
+ <status>1</status>
+ <pid>1335</pid>
+ <clientsStatus>
+ <clientCount>2</clientCount>
+ <client>
+ <hostname>192.168.122.2:1020</hostname>
+ <bytesRead>1172</bytesRead>
+ <bytesWrite>792</bytesWrite>
+ </client>
+ <client>
+ <hostname>192.168.122.2:1010</hostname>
+ <bytesRead>10864</bytesRead>
+ <bytesWrite>12816</bytesWrite>
+ </client>
+ </clientsStatus>
+ </node>
+ </volume>
+ </volumes>
</volStatus>
</cliOutput>
"""
@@ -406,356 +418,360 @@
<opErrno>0</opErrno>
<opErrstr/>
<volStatus>
- <volName>music</volName>
- <nodeCount>2</nodeCount>
- <node>
- <hostname>192.168.122.2</hostname>
- <path>/tmp/music-b1</path>
- <port>49152</port>
- <status>1</status>
- <pid>1452</pid>
- <memStatus>
- <mallinfo>
- <arena>606208</arena>
- <ordblks>6</ordblks>
- <smblks>1</smblks>
- <hblks>12</hblks>
- <hblkhd>15179776</hblkhd>
- <usmblks>0</usmblks>
- <fsmblks>64</fsmblks>
- <uordblks>474208</uordblks>
- <fordblks>132000</fordblks>
- <keepcost>130224</keepcost>
- </mallinfo>
- <mempool>
- <count>15</count>
- <pool>
- <name>music-server:fd_t</name>
- <hotCount>0</hotCount>
- <coldCount>1024</coldCount>
- <padddedSizeOf>100</padddedSizeOf>
- <allocCount>0</allocCount>
- <maxAlloc>0</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>music-server:dentry_t</name>
- <hotCount>0</hotCount>
- <coldCount>16384</coldCount>
- <padddedSizeOf>84</padddedSizeOf>
- <allocCount>0</allocCount>
- <maxAlloc>0</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>music-server:inode_t</name>
- <hotCount>1</hotCount>
- <coldCount>16383</coldCount>
- <padddedSizeOf>148</padddedSizeOf>
- <allocCount>1</allocCount>
- <maxAlloc>1</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>music-locks:pl_local_t</name>
- <hotCount>0</hotCount>
- <coldCount>32</coldCount>
- <padddedSizeOf>140</padddedSizeOf>
- <allocCount>1</allocCount>
- <maxAlloc>1</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>music-marker:marker_local_t</name>
- <hotCount>0</hotCount>
- <coldCount>128</coldCount>
- <padddedSizeOf>316</padddedSizeOf>
- <allocCount>0</allocCount>
- <maxAlloc>0</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>music-server:rpcsvc_request_t</name>
- <hotCount>0</hotCount>
- <coldCount>512</coldCount>
- <padddedSizeOf>6372</padddedSizeOf>
- <allocCount>10</allocCount>
- <maxAlloc>1</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>glusterfs:struct saved_frame</name>
- <hotCount>0</hotCount>
- <coldCount>8</coldCount>
- <padddedSizeOf>124</padddedSizeOf>
- <allocCount>2</allocCount>
- <maxAlloc>2</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>glusterfs:struct rpc_req</name>
- <hotCount>0</hotCount>
- <coldCount>8</coldCount>
- <padddedSizeOf>2236</padddedSizeOf>
- <allocCount>2</allocCount>
- <maxAlloc>2</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>glusterfs:rpcsvc_request_t</name>
- <hotCount>1</hotCount>
- <coldCount>7</coldCount>
- <padddedSizeOf>6372</padddedSizeOf>
- <allocCount>1</allocCount>
- <maxAlloc>1</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>glusterfs:data_t</name>
- <hotCount>117</hotCount>
- <coldCount>16266</coldCount>
- <padddedSizeOf>52</padddedSizeOf>
- <allocCount>179</allocCount>
- <maxAlloc>121</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>glusterfs:data_pair_t</name>
- <hotCount>138</hotCount>
- <coldCount>16245</coldCount>
- <padddedSizeOf>68</padddedSizeOf>
- <allocCount>218</allocCount>
- <maxAlloc>142</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>glusterfs:dict_t</name>
- <hotCount>13</hotCount>
- <coldCount>4083</coldCount>
- <padddedSizeOf>84</padddedSizeOf>
- <allocCount>24</allocCount>
- <maxAlloc>15</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>glusterfs:call_stub_t</name>
- <hotCount>0</hotCount>
- <coldCount>1024</coldCount>
- <padddedSizeOf>1228</padddedSizeOf>
- <allocCount>2</allocCount>
- <maxAlloc>1</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>glusterfs:call_stack_t</name>
- <hotCount>0</hotCount>
- <coldCount>1024</coldCount>
- <padddedSizeOf>2084</padddedSizeOf>
- <allocCount>4</allocCount>
- <maxAlloc>2</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>glusterfs:call_frame_t</name>
- <hotCount>0</hotCount>
- <coldCount>4096</coldCount>
- <padddedSizeOf>172</padddedSizeOf>
- <allocCount>14</allocCount>
- <maxAlloc>7</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- </mempool>
- </memStatus>
- </node>
- <node>
- <hostname>192.168.122.2</hostname>
- <path>/tmp/music-b2</path>
- <port>49153</port>
- <status>1</status>
- <pid>1459</pid>
- <memStatus>
- <mallinfo>
- <arena>606208</arena>
- <ordblks>5</ordblks>
- <smblks>2</smblks>
- <hblks>12</hblks>
- <hblkhd>15179776</hblkhd>
- <usmblks>0</usmblks>
- <fsmblks>128</fsmblks>
- <uordblks>474224</uordblks>
- <fordblks>131984</fordblks>
- <keepcost>130224</keepcost>
- </mallinfo>
- <mempool>
- <count>15</count>
- <pool>
- <name>music-server:fd_t</name>
- <hotCount>0</hotCount>
- <coldCount>1024</coldCount>
- <padddedSizeOf>100</padddedSizeOf>
- <allocCount>0</allocCount>
- <maxAlloc>0</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>music-server:dentry_t</name>
- <hotCount>0</hotCount>
- <coldCount>16384</coldCount>
- <padddedSizeOf>84</padddedSizeOf>
- <allocCount>0</allocCount>
- <maxAlloc>0</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>music-server:inode_t</name>
- <hotCount>1</hotCount>
- <coldCount>16383</coldCount>
- <padddedSizeOf>148</padddedSizeOf>
- <allocCount>2</allocCount>
- <maxAlloc>2</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>music-locks:pl_local_t</name>
- <hotCount>0</hotCount>
- <coldCount>32</coldCount>
- <padddedSizeOf>140</padddedSizeOf>
- <allocCount>1</allocCount>
- <maxAlloc>1</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>music-marker:marker_local_t</name>
- <hotCount>0</hotCount>
- <coldCount>128</coldCount>
- <padddedSizeOf>316</padddedSizeOf>
- <allocCount>0</allocCount>
- <maxAlloc>0</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>music-server:rpcsvc_request_t</name>
- <hotCount>0</hotCount>
- <coldCount>512</coldCount>
- <padddedSizeOf>6372</padddedSizeOf>
- <allocCount>12</allocCount>
- <maxAlloc>1</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>glusterfs:struct saved_frame</name>
- <hotCount>0</hotCount>
- <coldCount>8</coldCount>
- <padddedSizeOf>124</padddedSizeOf>
- <allocCount>2</allocCount>
- <maxAlloc>2</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>glusterfs:struct rpc_req</name>
- <hotCount>0</hotCount>
- <coldCount>8</coldCount>
- <padddedSizeOf>2236</padddedSizeOf>
- <allocCount>2</allocCount>
- <maxAlloc>2</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>glusterfs:rpcsvc_request_t</name>
- <hotCount>1</hotCount>
- <coldCount>7</coldCount>
- <padddedSizeOf>6372</padddedSizeOf>
- <allocCount>1</allocCount>
- <maxAlloc>1</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>glusterfs:data_t</name>
- <hotCount>117</hotCount>
- <coldCount>16266</coldCount>
- <padddedSizeOf>52</padddedSizeOf>
- <allocCount>180</allocCount>
- <maxAlloc>121</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>glusterfs:data_pair_t</name>
- <hotCount>138</hotCount>
- <coldCount>16245</coldCount>
- <padddedSizeOf>68</padddedSizeOf>
- <allocCount>220</allocCount>
- <maxAlloc>142</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>glusterfs:dict_t</name>
- <hotCount>13</hotCount>
- <coldCount>4083</coldCount>
- <padddedSizeOf>84</padddedSizeOf>
- <allocCount>25</allocCount>
- <maxAlloc>15</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>glusterfs:call_stub_t</name>
- <hotCount>0</hotCount>
- <coldCount>1024</coldCount>
- <padddedSizeOf>1228</padddedSizeOf>
- <allocCount>4</allocCount>
- <maxAlloc>1</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>glusterfs:call_stack_t</name>
- <hotCount>0</hotCount>
- <coldCount>1024</coldCount>
- <padddedSizeOf>2084</padddedSizeOf>
- <allocCount>6</allocCount>
- <maxAlloc>2</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- <pool>
- <name>glusterfs:call_frame_t</name>
- <hotCount>0</hotCount>
- <coldCount>4096</coldCount>
- <padddedSizeOf>172</padddedSizeOf>
- <allocCount>20</allocCount>
- <maxAlloc>7</maxAlloc>
- <poolMisses>0</poolMisses>
- <maxStdAlloc>0</maxStdAlloc>
- </pool>
- </mempool>
- </memStatus>
- </node>
+ <volumes>
+ <volume>
+ <volName>music</volName>
+ <nodeCount>2</nodeCount>
+ <node>
+ <hostname>192.168.122.2</hostname>
+ <path>/tmp/music-b1</path>
+ <port>49152</port>
+ <status>1</status>
+ <pid>1452</pid>
+ <memStatus>
+ <mallinfo>
+ <arena>606208</arena>
+ <ordblks>6</ordblks>
+ <smblks>1</smblks>
+ <hblks>12</hblks>
+ <hblkhd>15179776</hblkhd>
+ <usmblks>0</usmblks>
+ <fsmblks>64</fsmblks>
+ <uordblks>474208</uordblks>
+ <fordblks>132000</fordblks>
+ <keepcost>130224</keepcost>
+ </mallinfo>
+ <mempool>
+ <count>15</count>
+ <pool>
+ <name>music-server:fd_t</name>
+ <hotCount>0</hotCount>
+ <coldCount>1024</coldCount>
+ <padddedSizeOf>100</padddedSizeOf>
+ <allocCount>0</allocCount>
+ <maxAlloc>0</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>music-server:dentry_t</name>
+ <hotCount>0</hotCount>
+ <coldCount>16384</coldCount>
+ <padddedSizeOf>84</padddedSizeOf>
+ <allocCount>0</allocCount>
+ <maxAlloc>0</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>music-server:inode_t</name>
+ <hotCount>1</hotCount>
+ <coldCount>16383</coldCount>
+ <padddedSizeOf>148</padddedSizeOf>
+ <allocCount>1</allocCount>
+ <maxAlloc>1</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>music-locks:pl_local_t</name>
+ <hotCount>0</hotCount>
+ <coldCount>32</coldCount>
+ <padddedSizeOf>140</padddedSizeOf>
+ <allocCount>1</allocCount>
+ <maxAlloc>1</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>music-marker:marker_local_t</name>
+ <hotCount>0</hotCount>
+ <coldCount>128</coldCount>
+ <padddedSizeOf>316</padddedSizeOf>
+ <allocCount>0</allocCount>
+ <maxAlloc>0</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>music-server:rpcsvc_request_t</name>
+ <hotCount>0</hotCount>
+ <coldCount>512</coldCount>
+ <padddedSizeOf>6372</padddedSizeOf>
+ <allocCount>10</allocCount>
+ <maxAlloc>1</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>glusterfs:struct saved_frame</name>
+ <hotCount>0</hotCount>
+ <coldCount>8</coldCount>
+ <padddedSizeOf>124</padddedSizeOf>
+ <allocCount>2</allocCount>
+ <maxAlloc>2</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>glusterfs:struct rpc_req</name>
+ <hotCount>0</hotCount>
+ <coldCount>8</coldCount>
+ <padddedSizeOf>2236</padddedSizeOf>
+ <allocCount>2</allocCount>
+ <maxAlloc>2</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>glusterfs:rpcsvc_request_t</name>
+ <hotCount>1</hotCount>
+ <coldCount>7</coldCount>
+ <padddedSizeOf>6372</padddedSizeOf>
+ <allocCount>1</allocCount>
+ <maxAlloc>1</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>glusterfs:data_t</name>
+ <hotCount>117</hotCount>
+ <coldCount>16266</coldCount>
+ <padddedSizeOf>52</padddedSizeOf>
+ <allocCount>179</allocCount>
+ <maxAlloc>121</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>glusterfs:data_pair_t</name>
+ <hotCount>138</hotCount>
+ <coldCount>16245</coldCount>
+ <padddedSizeOf>68</padddedSizeOf>
+ <allocCount>218</allocCount>
+ <maxAlloc>142</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>glusterfs:dict_t</name>
+ <hotCount>13</hotCount>
+ <coldCount>4083</coldCount>
+ <padddedSizeOf>84</padddedSizeOf>
+ <allocCount>24</allocCount>
+ <maxAlloc>15</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>glusterfs:call_stub_t</name>
+ <hotCount>0</hotCount>
+ <coldCount>1024</coldCount>
+ <padddedSizeOf>1228</padddedSizeOf>
+ <allocCount>2</allocCount>
+ <maxAlloc>1</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>glusterfs:call_stack_t</name>
+ <hotCount>0</hotCount>
+ <coldCount>1024</coldCount>
+ <padddedSizeOf>2084</padddedSizeOf>
+ <allocCount>4</allocCount>
+ <maxAlloc>2</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>glusterfs:call_frame_t</name>
+ <hotCount>0</hotCount>
+ <coldCount>4096</coldCount>
+ <padddedSizeOf>172</padddedSizeOf>
+ <allocCount>14</allocCount>
+ <maxAlloc>7</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ </mempool>
+ </memStatus>
+ </node>
+ <node>
+ <hostname>192.168.122.2</hostname>
+ <path>/tmp/music-b2</path>
+ <port>49153</port>
+ <status>1</status>
+ <pid>1459</pid>
+ <memStatus>
+ <mallinfo>
+ <arena>606208</arena>
+ <ordblks>5</ordblks>
+ <smblks>2</smblks>
+ <hblks>12</hblks>
+ <hblkhd>15179776</hblkhd>
+ <usmblks>0</usmblks>
+ <fsmblks>128</fsmblks>
+ <uordblks>474224</uordblks>
+ <fordblks>131984</fordblks>
+ <keepcost>130224</keepcost>
+ </mallinfo>
+ <mempool>
+ <count>15</count>
+ <pool>
+ <name>music-server:fd_t</name>
+ <hotCount>0</hotCount>
+ <coldCount>1024</coldCount>
+ <padddedSizeOf>100</padddedSizeOf>
+ <allocCount>0</allocCount>
+ <maxAlloc>0</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>music-server:dentry_t</name>
+ <hotCount>0</hotCount>
+ <coldCount>16384</coldCount>
+ <padddedSizeOf>84</padddedSizeOf>
+ <allocCount>0</allocCount>
+ <maxAlloc>0</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>music-server:inode_t</name>
+ <hotCount>1</hotCount>
+ <coldCount>16383</coldCount>
+ <padddedSizeOf>148</padddedSizeOf>
+ <allocCount>2</allocCount>
+ <maxAlloc>2</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>music-locks:pl_local_t</name>
+ <hotCount>0</hotCount>
+ <coldCount>32</coldCount>
+ <padddedSizeOf>140</padddedSizeOf>
+ <allocCount>1</allocCount>
+ <maxAlloc>1</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>music-marker:marker_local_t</name>
+ <hotCount>0</hotCount>
+ <coldCount>128</coldCount>
+ <padddedSizeOf>316</padddedSizeOf>
+ <allocCount>0</allocCount>
+ <maxAlloc>0</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>music-server:rpcsvc_request_t</name>
+ <hotCount>0</hotCount>
+ <coldCount>512</coldCount>
+ <padddedSizeOf>6372</padddedSizeOf>
+ <allocCount>12</allocCount>
+ <maxAlloc>1</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>glusterfs:struct saved_frame</name>
+ <hotCount>0</hotCount>
+ <coldCount>8</coldCount>
+ <padddedSizeOf>124</padddedSizeOf>
+ <allocCount>2</allocCount>
+ <maxAlloc>2</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>glusterfs:struct rpc_req</name>
+ <hotCount>0</hotCount>
+ <coldCount>8</coldCount>
+ <padddedSizeOf>2236</padddedSizeOf>
+ <allocCount>2</allocCount>
+ <maxAlloc>2</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>glusterfs:rpcsvc_request_t</name>
+ <hotCount>1</hotCount>
+ <coldCount>7</coldCount>
+ <padddedSizeOf>6372</padddedSizeOf>
+ <allocCount>1</allocCount>
+ <maxAlloc>1</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>glusterfs:data_t</name>
+ <hotCount>117</hotCount>
+ <coldCount>16266</coldCount>
+ <padddedSizeOf>52</padddedSizeOf>
+ <allocCount>180</allocCount>
+ <maxAlloc>121</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>glusterfs:data_pair_t</name>
+ <hotCount>138</hotCount>
+ <coldCount>16245</coldCount>
+ <padddedSizeOf>68</padddedSizeOf>
+ <allocCount>220</allocCount>
+ <maxAlloc>142</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>glusterfs:dict_t</name>
+ <hotCount>13</hotCount>
+ <coldCount>4083</coldCount>
+ <padddedSizeOf>84</padddedSizeOf>
+ <allocCount>25</allocCount>
+ <maxAlloc>15</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>glusterfs:call_stub_t</name>
+ <hotCount>0</hotCount>
+ <coldCount>1024</coldCount>
+ <padddedSizeOf>1228</padddedSizeOf>
+ <allocCount>4</allocCount>
+ <maxAlloc>1</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>glusterfs:call_stack_t</name>
+ <hotCount>0</hotCount>
+ <coldCount>1024</coldCount>
+ <padddedSizeOf>2084</padddedSizeOf>
+ <allocCount>6</allocCount>
+ <maxAlloc>2</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ <pool>
+ <name>glusterfs:call_frame_t</name>
+ <hotCount>0</hotCount>
+ <coldCount>4096</coldCount>
+ <padddedSizeOf>172</padddedSizeOf>
+ <allocCount>20</allocCount>
+ <maxAlloc>7</maxAlloc>
+ <poolMisses>0</poolMisses>
+ <maxStdAlloc>0</maxStdAlloc>
+ </pool>
+ </mempool>
+ </memStatus>
+ </node>
+ </volume>
+ </volumes>
</volStatus>
</cliOutput>
"""
diff --git a/vdsm/gluster/cli.py b/vdsm/gluster/cli.py
index af16891..c2c3542 100644
--- a/vdsm/gluster/cli.py
+++ b/vdsm/gluster/cli.py
@@ -117,12 +117,12 @@
def _parseVolumeStatus(tree):
- status = {'name': tree.find('volStatus/volName').text,
+ status = {'name': tree.find('volStatus/volumes/volume/volName').text,
'bricks': [],
'nfs': [],
'shd': []}
hostname = _getLocalIpAddress() or _getGlusterHostName()
- for el in tree.findall('volStatus/node'):
+ for el in tree.findall('volStatus/volumes/volume/node'):
value = {}
for ch in el.getchildren():
@@ -155,9 +155,9 @@
def _parseVolumeStatusDetail(tree):
- status = {'name': tree.find('volStatus/volName').text,
+ status = {'name': tree.find('volStatus/volumes/volume/volName').text,
'bricks': []}
- for el in tree.findall('volStatus/node'):
+ for el in tree.findall('volStatus/volumes/volume/node'):
value = {}
for ch in el.getchildren():
@@ -179,9 +179,9 @@
def _parseVolumeStatusClients(tree):
- status = {'name': tree.find('volStatus/volName').text,
+ status = {'name': tree.find('volStatus/volumes/volume/volName').text,
'bricks': []}
- for el in tree.findall('volStatus/node'):
+ for el in tree.findall('volStatus/volumes/volume/node'):
hostname = el.find('hostname').text
path = el.find('path').text
@@ -200,9 +200,9 @@
def _parseVolumeStatusMem(tree):
- status = {'name': tree.find('volStatus/volName').text,
+ status = {'name': tree.find('volStatus/volumes/volume/volName').text,
'bricks': []}
- for el in tree.findall('volStatus/node'):
+ for el in tree.findall('volStatus/volumes/volume/node'):
brick = {'brick': '%s:%s' % (el.find('hostname').text,
el.find('path').text),
'mallinfo': {},
diff --git a/vdsm_cli/vdsClientGluster.py b/vdsm_cli/vdsClientGluster.py
index 7799735..25e7dc6 100644
--- a/vdsm_cli/vdsClientGluster.py
+++ b/vdsm_cli/vdsClientGluster.py
@@ -235,10 +235,11 @@
return status['status']['code'], status['status']['message']
def do_glusterVolumeStatus(self, args):
- volumeName = args[0]
- params = self._eqSplit(args[1:])
+ params = self._eqSplit(args)
+ volumeName = params.get('volumeName', '')
brick = params.get('brick', '')
option = params.get('option', '')
+
status = self.s.glusterVolumeStatus(volumeName, brick, option)
pp.pprint(status)
return status['status']['code'], status['status']['message']
@@ -421,12 +422,12 @@
)),
'glusterVolumeStatus':
(serv.do_glusterVolumeStatus,
- ('<volume_name> [brick=<existing_brick>] '
+ ('volumeName=<volume_name> [brick=<existing_brick>] '
'[option={detail | clients | mem}]\n\t'
'<volume_name> is existing volume name\n\t'
- 'detail option gives brick detailed status\n\t'
- 'clients option gives clients status\n\t'
- 'mem option gives memory status\n\t',
+ 'option=detail gives brick detailed status\n\t'
+ 'option=clients gives clients status\n\t'
+ 'option=mem gives memory status\n\t',
'get volume status of given volume with its all brick or '
'specified brick'
)),
--
To view, visit http://gerrit.ovirt.org/9323
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icfb5c622b369d4ecd1ee0010595bec25557fe0c2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Bala.FA <barumuga at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce 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