Bug 2231084

Summary: fence_eps throws python traceback in RHEL 8
Product: Red Hat Enterprise Linux 8 Reporter: Josef Zimek <pzimek>
Component: fence-agentsAssignee: Oyvind Albrigtsen <oalbrigt>
Status: ASSIGNED --- QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.10CC: cluster-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Josef Zimek 2023-08-10 14:11:06 UTC
Description of problem:

fence_eps doesn't work as expected in RHEL 8.

Fence test fails:
~~~
/usr/sbin/fence_eps -a 192.168.253.6 -o list-status -v
2023-08-10 07:52:16,285 DEBUG: GET /hidden.htm

2023-08-10 07:52:16,293 DEBUG: 200 OK

2023-08-10 07:52:16,294 DEBUG: b'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\r\n<html>\r\n<head>\r\n<meta http-equiv="Cache-Control" content="no-cache">\r\n</head>\r\n<body>Hidden Page<br><pre>\r\n10 Aug 2023 07:52:58\r\nePowerSwitch 8M+ R3\r\nVersion: v 4.0.0.4\r\nM0:PWA=Applied\r\nM0:PWB=Applied\r\nM0:O1=On\r\nM0:O2=Off\r\nM0:O3=Off\r\nM0:O4=Off\r\nM0:O5=On\r\nM0:O6=Off\r\nM0:O7=Off\r\nM0:O8=Off\r\n\r\n</pre>\r\n</body></html>\t\t\t\t\t\t\t\t\t\t\t  '

Traceback (most recent call last):
  File "/usr/sbin/fence_eps", line 129, in <module>
    main()
  File "/usr/sbin/fence_eps", line 124, in main
    result = fence_action(None, options, set_power_status, get_power_status, get_power_status)
  File "/usr/share/fence/fencing.py", line 941, in fence_action
    outlets = get_outlet_list(connection, options)
  File "/usr/sbin/fence_eps", line 70, in get_power_status
    status = re.findall(r"p(\d{2})=(0|1)\s*\<br\>", ret_val.lower())
  File "/usr/lib64/python3.6/re.py", line 222, in findall
    return _compile(pattern, flags).findall(string)
TypeError: cannot use a string pattern on a bytes-like object
~~~


Version-Release number of selected component (if applicable):
fence-agents-eps-4.2.1-112.el8.noarch

How reproducible:
always


Actual results:
fence agent throws python traceback

Expected results:
fence agents probes fence device successfully