Bug 576176 - fence_ilo will throw exception if user does not have power priviledges
Summary: fence_ilo will throw exception if user does not have power priviledges
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: cman
Version: 5.6
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Marek Grac
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks: 576178 615255
TreeView+ depends on / blocked
 
Reported: 2010-03-23 13:50 UTC by Shane Bradley
Modified: 2018-11-14 20:17 UTC (History)
4 users (show)

Fixed In Version: cman-2.0.115-41.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 576178 615255 (view as bug list)
Environment:
Last Closed: 2011-01-13 22:32:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
fence_ilo patch to catch EOF (646 bytes, patch)
2010-03-23 13:50 UTC, Shane Bradley
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:0036 0 normal SHIPPED_LIVE cman bug-fix and enhancement update 2011-01-12 17:39:38 UTC

Description Shane Bradley 2010-03-23 13:50:21 UTC
Created attachment 402055 [details]
fence_ilo patch to catch EOF

Description of problem:

If user/loginid does not have "power priviledges then fencing of the
node will fail. The reason that it fails is because the menu is
different since the user does not have power priviledges. Thus a
"pexpect.EOF" exception is thrown and exception is not caught.

Got the following error:
$ fence_ilo -a 10.10.56.243  -l sbradley -p redhatrules -o reboot
Traceback (most recent call last):
 File "/sbin/fence_ilo", line 104, in ?
   main()
 File "/sbin/fence_ilo", line 101, in main
   fence_action(conn, options, set_power_status, get_power_status)
 File "/usr/lib/fence/fencing.py", line 431, in fence_action
   if wait_power_status(tn, options, get_power_fn) == 0:
 File "/usr/lib/fence/fencing.py", line 397, in wait_power_status
   if get_power_fn(tn, options) != options["-o"]:
 File "/sbin/fence_ilo", line 31, in get_power_status
   conn.log_expect(options, "HOST_POWER=\"(.*?)\"", POWER_TIMEOUT)
 File "/usr/lib/fence/fencing.py", line 197, in log_expect
   result = self.expect(pattern, timeout)
 File "/usr/lib/python2.4/site-packages/pexpect.py", line 1311, in expect
   return self.expect_list(compiled_pattern_list, timeout, searchwindowsize)
 File "/usr/lib/python2.4/site-packages/pexpect.py", line 1325, in expect_list
   return self.expect_loop(searcher_re(pattern_list), timeout, searchwindowsize)
 File "/usr/lib/python2.4/site-packages/pexpect.py", line 1396, in expect_loop
   raise EOF (str(e) + '\n' + str(self))
pexpect.EOF: End Of File (EOF) in read_nonblocking(). Exception style platform.
<fencing.fspawn object at 0x2b5a8ed50d90>
version: 2.3 ($Revision: 399 $)
command: /usr/lib/fence/telnet_ssl
args: ['/usr/lib/fence/telnet_ssl', '11.1.5.2', '443']
searcher: searcher_re:
   0: re.compile("HOST_POWER="(.*?)"")
buffer (last 100 chars):
before (last 100 chars):  "password">

<SERVER_INFO MODE = "read"><GET_HOST_POWER_STATUS/>

</SERVER_INFO></LOGIN>


Version-Release number of selected component (if applicable):
cman-2.0.115-34.el5.x86_64

How reproducible:
Everytime

Steps to Reproduce:
1. Create user on ilo device without power priviledges("Virtual Power and Reset") 
2. fence_ilo -a 192.1.5.2  -l username -p password -o reboot
  
Actual results:
The fencing will fail with backtrace and node will not be fenced
correctly.

Expected results:
The node should be fenced correctly and error gracefully.

Additional info:
I have attached a patch to fix this issue. The patch catches the
exception and then calls the fail function.

Comment 2 Marek Grac 2010-07-16 10:09:31 UTC
Shane, thanks for the patch

Patch is in upstream now:

http://git.fedorahosted.org/git/?p=cluster.git;a=commit;h=d6da8cc3ae8121074ed9330db0f236ecdd4b322f

Comment 6 errata-xmlrpc 2011-01-13 22:32:41 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0036.html


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