Bug 1688052 - Typo and exception due to non-iterable object on gluster fencing testing
Summary: Typo and exception due to non-iterable object on gluster fencing testing
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 4.3.1
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ovirt-4.4.0
: 4.4.0
Assignee: Kaustav Majumder
QA Contact: SATHEESARAN
URL:
Whiteboard:
Depends On:
Blocks: 1723678 1746718
TreeView+ depends on / blocked
 
Reported: 2019-03-13 02:06 UTC by Germano Veit Michel
Modified: 2020-08-03 15:39 UTC (History)
9 users (show)

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.
Clone Of:
: 1723678 1746718 (view as bug list)
Environment:
Last Closed: 2020-04-16 10:36:43 UTC
oVirt Team: Gluster
Target Upstream Version:
lsvaty: testing_plan_complete-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 98613 0 'None' MERGED gluster: Fix for typo and exception due to empty dict returned from _getVolumeStatus 2020-07-13 18:37:11 UTC
oVirt gerrit 101422 0 'None' MERGED gluster: Fix for typo and exception due to empty dict returned from _getVolumeStatus 2020-07-13 18:37:11 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.