Bug 576176
Summary: | fence_ilo will throw exception if user does not have power priviledges | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Shane Bradley <sbradley> | ||||
Component: | cman | Assignee: | Marek Grac <mgrac> | ||||
Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 5.6 | CC: | cluster-maint, djansa, iannis, tao | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | cman-2.0.115-41.el5 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 576178 615255 (view as bug list) | Environment: | |||||
Last Closed: | 2011-01-13 22:32:41 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 576178, 615255 | ||||||
Attachments: |
|
Shane, thanks for the patch Patch is in upstream now: http://git.fedorahosted.org/git/?p=cluster.git;a=commit;h=d6da8cc3ae8121074ed9330db0f236ecdd4b322f 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 |
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.