Description of problem: volumeEmptyCheck in vdsm-gluster doesn't work and throws error. Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1.Setup a ovirt-gluster hci cluster 2.Run vdsm-client --gluster-enabled GlusterVolume volumeEmptyCheck volumeName=data on one of the hosts. Actual results: Volume empty check is issued by vdsm-client. Errors: vdsm-client: Command GlusterVolume.volumeEmptyCheck with args {'volumeName': 'data'} failed: (code=4574, message=Failed to Check if gluster volume is empty: rc=1 out=[b'/usr/bin/python3: No module named gluster.gfapi\n'] err=()) Expected results: No errors should be observed. Additional info: Similar to a other functionalities in gfapi.py which throws error and needs rework. excerpt from supervdsm log MainProcess|jsonrpc/7::ERROR::2020-06-02 10:28:52,973::supervdsm_server::97::SuperVdsm.ServerCallback::(wrapper) Error in volumeEmptyCheck Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/vdsm/gluster/gfapi.py", line 266, in volumeEmptyCheck out = commands.run(command, env=env) File "/usr/lib/python3.6/site-packages/vdsm/common/commands.py", line 101, in run raise cmdutils.Error(args, p.returncode, out, err) vdsm.common.cmdutils.Error: Command ['/usr/bin/python3', '-m', 'gluster.gfapi', '-v', 'data', '-p', '24007', '-H', 'localhost', '-t', 'tcp', '-c', 'readdir'] failed with rc=1 out=b'' err=b'/usr/bin/python3: No module named gluster.gfapi\n' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/vdsm/supervdsm_server.py", line 95, in wrapper res = func(*args, **kwargs) File "/usr/lib/python3.6/site-packages/vdsm/gluster/gfapi.py", line 268, in volumeEmptyCheck raise ge.GlusterVolumeEmptyCheckFailedException(e.rc, [e.err]) vdsm.gluster.exception.GlusterVolumeEmptyCheckFailedException: Failed to Check if gluster volume is empty: rc=1 out=[b'/usr/bin/python3: No module named gluster.gfapi\n'] err=()
Hmmm, are you running with libgfapi?
(In reply to Yaniv Kaul from comment #1) > Hmmm, are you running with libgfapi? With and without, have checked. Both giving the same errors.
(In reply to Yaniv Kaul from comment #1) > Hmmm, are you running with libgfapi? gfapi is also used in vdsm to check volume size - this has no relation to the gfapi driver in qemu. The failure seen here is from the internal usage of gfapi to query volume size.
Posted a patch. Please review.
Verified with vdsm-4.40.22-1.el8ev.x86_64 There are no exceptions see with supervdsm.log or vdsm.log related to 'vdsm.gluster.exception.GlusterVolumeEmptyCheckFailedException'
This bugzilla is included in oVirt 4.4.1 release, published on July 8th 2020. Since the problem described in this bug report should be resolved in oVirt 4.4.1 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.