Bug 2231084 - fence_eps throws python traceback in RHEL 8
Summary: fence_eps throws python traceback in RHEL 8
Keywords:
Status: ASSIGNED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: fence-agents
Version: 8.10
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Oyvind Albrigtsen
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-10 14:11 UTC by Josef Zimek
Modified: 2023-08-16 10:58 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-165518 0 None None None 2023-08-10 14:12:09 UTC
Red Hat Knowledge Base (Solution) 7028225 0 None None None 2023-08-10 14:24:22 UTC

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


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