Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1688052

Summary: Typo and exception due to non-iterable object on gluster fencing testing
Product: Red Hat Enterprise Virtualization Manager Reporter: Germano Veit Michel <gveitmic>
Component: vdsmAssignee: Kaustav Majumder <kmajumde>
Status: CLOSED CURRENTRELEASE QA Contact: SATHEESARAN <sasundar>
Severity: low Docs Contact:
Priority: low    
Version: 4.3.1CC: godas, kmajumde, lleistne, lsurette, mtessun, rdlugyhe, sabose, srevivo, ycui
Target Milestone: ovirt-4.4.0Keywords: ZStream
Target Release: 4.4.0Flags: lsvaty: testing_plan_complete-
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: rhv-4.4.0-29 Doc Type: Bug Fix
Doc Text:
Previously, the gluster fencing policy check failed due to a non-iterable object and threw an exception. The code also contained a minor typo. The current release fixes these issues.
Story Points: ---
Clone Of:
: 1723678 1746718 (view as bug list) Environment:
Last Closed: 2020-04-16 10:36:43 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: 1723678, 1746718    

Description Germano Veit Michel 2019-03-13 02:06:59 UTC
Description of problem:

In case gluster fencing policy check fails, _getVolumeStatus returns an empty dict[1]. Then, can_fence_host iterates through the returned empty dict with the method .get("bricks"), which is None. This throws an ugly exception[3] in the logs. If it happens frequently, it can spam significantly.

In addition, in the related code there are two typos ("realted" instead of "related") here[4] and here[5].

[1] https://github.com/oVirt/vdsm/blob/master/lib/vdsm/gluster/fence.py#L112
[2] https://github.com/oVirt/vdsm/blob/master/lib/vdsm/gluster/fence.py#L39
[3]
2019-02-28 14:43:21,324+0000 WARN  (jsonrpc/1) [Gluster] Failed to check
gluster realted fencing policies: Command execution failed
error: Error : Request timed out
return code: 1 (fence:109)
2019-02-28 14:43:21,324+0000 ERROR (jsonrpc/1) [DynamicBridge] TypeError
raised by dispatched function (Bridge:199)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/vdsm/rpc/Bridge.py", line 193,
in _dynamicMethod
    result = fn(*methodArgs)
  File "/usr/lib/python2.7/site-packages/vdsm/API.py", line 1265, in
fenceNode
    if action != 'status' and not should_fence(policy):
  File "/usr/lib/python2.7/site-packages/vdsm/API.py", line 1193, in
should_fence
    result = check_gluster_fencing_policies(policy)
  File "/usr/lib/python2.7/site-packages/vdsm/API.py", line 1250, in
check_gluster_fencing_policies
    skipFencingIfGlusterQuorumNotMet)
  File "/usr/lib/python2.7/site-packages/vdsm/gluster/fence.py", line
37, in can_fence_host
    for brick in volStatus.get('bricks'):
TypeError: 'NoneType' object is not iterable
[4] https://github.com/oVirt/vdsm/blob/master/lib/vdsm/gluster/fence.py#L101
[5] https://github.com/oVirt/vdsm/blob/master/lib/vdsm/gluster/fence.py#L110

Comment 6 Sahina Bose 2019-04-23 07:04:53 UTC
Any update?

Comment 7 SATHEESARAN 2019-07-18 17:20:20 UTC
As discussed with Gobinda, the fix for this bug will be targeted for ovirt-4.3.6

Comment 9 Daniel Gur 2019-08-28 13:14:50 UTC
sync2jira

Comment 10 Daniel Gur 2019-08-28 13:19:53 UTC
sync2jira

Comment 12 Gobinda Das 2019-11-21 09:14:14 UTC
This issue is already verified in 4.3.6, do we still need same for 4.4.0?

Comment 13 Germano Veit Michel 2019-11-21 22:16:45 UTC
(In reply to Gobinda Das from comment #12)
> This issue is already verified in 4.3.6, do we still need same for 4.4.0?

Hi Gobinda, 

Not sure if I understand your question correctly...

If you are asking if this BZ should be kept open to be in 4.4 errata, I think the answer is yes, that's the process. Or if you are asking if QE should also verify this BZ in 4.4, then this is more of a question to QE than me. It sounds like a simple fix and maybe it can be skipped, if the process allows?

Comment 15 Kaustav Majumder 2020-01-28 09:13:41 UTC
Clearing needinfo.

Comment 17 Lukas Svaty 2020-04-16 10:36:43 UTC
Closing low severity bugs, based on QE capacity, if you would like to still verify this issue please reopen.