fence_eps fails with traceback

Solution Verified - Updated -

Issue

Attempt to get status with fence_eps from fence device fails:

/usr/sbin/fence_eps -a 192.168.1.2 -o list-status -v
2023-05-05 07:52:16,285 DEBUG: GET /hidden.htm

2023-05-05 07:52:16,293 DEBUG: 200 OK

2023-05-05 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 05:05:05\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

Environment

  • Red Hat Enterprise Linux Server 8, 9 (with the High Availability Add On)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content