Open
Description
When I try to run the gdash for my server I have receive exception when I try to open volumes in UI
In my opinion problem is that xml generated on my machine not include section inodesTotal
'inodes_total': int(node_el.find('inodesTotal').text),
[19/Sep/2021:20:28:17] HTTP
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/glustercli/cli/parsers.py", line 268, in _parse_volume_status
nodes.append(_parse_a_node(node_el))
File "/usr/local/lib/python3.8/dist-packages/glustercli/cli/parsers.py", line 237, in _parse_a_node
'inodes_total': int(node_el.find('inodesTotal').text),
AttributeError: 'NoneType' object has no attribute 'text'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/cherrypy/_cprequest.py", line 638, in respond
self._do_respond(path_info)
File "/usr/local/lib/python3.8/dist-packages/cherrypy/_cprequest.py", line 697, in _do_respond
response.body = self.handler()
File "/usr/local/lib/python3.8/dist-packages/cherrypy/lib/encoding.py", line 223, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/cherrypy/lib/jsontools.py", line 59, in json_handler
value = cherrypy.serving.request._json_inner_handler(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/cherrypy/_cpdispatch.py", line 54, in __call__
return self.callable(*self.args, **self.kwargs)
File "/usr/local/lib/python3.8/dist-packages/gdash/__main__.py", line 99, in volumes
return volume.status_detail(group_subvols=True)
File "/usr/local/lib/python3.8/dist-packages/glustercli/cli/volume.py", line 187, in status_detail
return parse_volume_status(volume_execute_xml(cmd),
File "/usr/local/lib/python3.8/dist-packages/glustercli/cli/parsers.py", line 276, in parse_volume_status
nodes_data = _parse_volume_status(status_data)
File "/usr/local/lib/python3.8/dist-packages/glustercli/cli/parsers.py", line 270, in _parse_volume_status
raise GlusterCmdOutputParseError(err)
glustercli.cli.parsers.GlusterCmdOutputParseError: 'NoneType' object has no attribute 'text'
[19/Sep/2021:20:28:17] HTTP
Request Headers:
Remote-Addr: 192.168.10.19
HOST: glusterfs1:8080
CONNECTION: keep-alive
ACCEPT: application/json, text/plain, */*
USER-AGENT: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36
REFERER: http://glusterfs1:8080/volumes
ACCEPT-ENCODING: gzip, deflate
ACCEPT-LANGUAGE: en,pl-PL;q=0.9,pl;q=0.8,en-GB;q=0.7,en-US;q=0.6
COOKIE: session_id=0b9e47c8ce86c8fdbd11aa1af14a9db7f9f9e03e
192.168.10.19 - - [19/Sep/2021:20:28:17] "GET /api/volumes HTTP/1.1" 500 2754 "http://glusterfs1:8080/volumes" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36"
gluster vol status test-volume detail --xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cliOutput>
<opRet>0</opRet>
<opErrno>0</opErrno>
<opErrstr/>
<volStatus>
<volumes>
<volume>
<volName>test-volume</volName>
<nodeCount>2</nodeCount>
<node>
<hostname>glusterfs1</hostname>
<path>/gluster/test</path>
<peerid>8e119499-ab8d-4715-bace-2f16bfe23293</peerid>
<status>1</status>
<port>49159</port>
<ports>
<tcp>49159</tcp>
<rdma>N/A</rdma>
</ports>
<pid>6014</pid>
<sizeTotal>869729808384</sizeTotal>
<sizeFree>703918551040</sizeFree>
<device>/dev/sdb1</device>
<blockSize>4096</blockSize>
<mntOptions>rw,relatime,compress-force=lzo,space_cache,subvolid=5,subvol=/</mntOptions>
<fsName>btrfs</fsName>
<inodeSize>btrfs</inodeSize>
</node>
<node>
<hostname>glusterfs2</hostname>
<path>/gluster/test</path>
<peerid>8f5ef325-5a77-473b-8d5f-b2258440ac58</peerid>
<status>1</status>
<port>49159</port>
<ports>
<tcp>49159</tcp>
<rdma>N/A</rdma>
</ports>
<pid>108320</pid>
<sizeTotal>869729808384</sizeTotal>
<sizeFree>714670706688</sizeFree>
<device>/dev/sdb1</device>
<blockSize>4096</blockSize>
<mntOptions>rw,relatime,compress-force=lzo,space_cache,subvolid=5,subvol=/</mntOptions>
<fsName>btrfs</fsName>
<inodeSize>btrfs</inodeSize>
</node>
</volume>
</volumes>
</volStatus>
</cliOutput>
Below is version of installed glusterfs components: apt list --installed | grep gluster
glusterfs-client/focal,now 9.3-ubuntu1~focal1 amd64 [installed]
glusterfs-common/focal,now 9.3-ubuntu1~focal1 amd64 [installed]
glusterfs-server/focal,now 9.3-ubuntu1~focal1 amd64 [installed]
libglusterd0/focal,now 9.3-ubuntu1~focal1 amd64 [installed,automatic]
libglusterfs0/focal,now 9.3-ubuntu1~focal1 amd64 [installed,automatic]
Metadata
Metadata
Assignees
Labels
No labels