Bug 1842767

Summary: Unable to call volumeEmptyCheck in vdsm-gluster due to errors in vdsm-gluster
Product: [oVirt] vdsm Reporter: Kaustav Majumder <kmajumde>
Component: GlusterAssignee: Kaustav Majumder <kmajumde>
Status: CLOSED CURRENTRELEASE QA Contact: SATHEESARAN <sasundar>
Severity: high Docs Contact:
Priority: high    
Version: 4.40.1CC: bugs, godas, sabose
Target Milestone: ovirt-4.4.1Flags: sabose: ovirt-4.4?
sasundar: blocker?
sasundar: planning_ack?
godas: devel_ack+
sasundar: testing_ack+
Target Release: 4.40.20   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: vdsm-4.40.20 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1844348 (view as bug list) Environment:
Last Closed: 2020-08-05 06:24:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Gluster RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1844348    

Description Kaustav Majumder 2020-06-02 05:03:04 UTC
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=()

Comment 1 Yaniv Kaul 2020-06-02 07:59:25 UTC
Hmmm, are you running with libgfapi?

Comment 2 Kaustav Majumder 2020-06-02 09:36:34 UTC
(In reply to Yaniv Kaul from comment #1)
> Hmmm, are you running with libgfapi?

With and without, have checked. Both giving the same errors.

Comment 3 Sahina Bose 2020-06-03 12:58:30 UTC
(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.

Comment 4 Kaustav Majumder 2020-06-05 11:13:14 UTC
Posted a patch. Please review.

Comment 5 SATHEESARAN 2020-07-14 07:23:37 UTC
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'

Comment 6 Sandro Bonazzola 2020-08-05 06:24:41 UTC
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.