Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 545054

Summary: Fence agent for RSB ends with traceback
Product: Red Hat Enterprise Linux 5 Reporter: Marek Grac <mgrac>
Component: cmanAssignee: Marek Grac <mgrac>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: low    
Version: 5.5CC: cluster-maint, cward, danzani, davide.agnolazza, djansa, edamato, gasmith, jkortus, tao, twillber
Target Milestone: rcKeywords: OtherQA
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: cman-2.0.115-26.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-30 08:41: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:
Attachments:
Description Flags
Proposed patch
none
Patch starting from 5.4 original fence_rsb version with another bug fixed. See commento 10 for info none

Description Marek Grac 2009-12-07 13:14:50 UTC
Fence agent for RSB is not working anymore:

--
Waiting for power off to complete
Evaluating prompt...

Waiting for power off to complete
Evaluating prompt...

FENCE: Unable to power off serverEvaluating prompt...

Evaluating prompt...

Traceback (most recent call last):
 File "/sbin/fence_rsb", line 387, in ?
   main()
 File "/sbin/fence_rsb", line 267, in main
   i, mo, txt = sock.expect(regex_list, TELNET_TIMEOUT)
 File "/usr/lib/python2.3/telnetlib.py", line 620, in expect
   text = self.read_very_lazy()
 File "/usr/lib/python2.3/telnetlib.py", line 400, in read_very_lazy
   raise EOFError, 'telnet connection closed'
EOFError: telnet connection closed 
--

RSB changed so it don't print 'CLOSING CONNECTION' and 'Power status:' was
changed to 'Power status :'

Comment 1 Marek Grac 2009-12-07 13:42:01 UTC
Created attachment 376679 [details]
Proposed patch

Comment 10 Davide Agnolazza 2010-02-03 17:42:00 UTC
Hello,

this patch didn't work for me because mi version of fence_rsb is the Installation DVD of RHEL5.4.

So, for example, the "result" variable is not defined anywere. I fixed it, on line 287, replacing "sys.exit(result)" with "sys.exit(0)". Actually i don't know if the variable result is used elsewere and if it could have another value such as 1.

I also noticed that this script has another bug. For example, in the case of an immediate unexpected shutdown of the active node, the other node will try to fence the powered off node before switching the services. In this particular situation, where the machine status is "OFF" the script remain appendet waiting for a non existant event and the telnet session will tome out.

I made my own patch for this issue, but my original script was the DVD's, so the diff result pretty different from this one.

So, the file I'm attaching is the diff between the original fence_rsb and the one I actually obtained applying your patch plus mine (which incluthe the 287 line replacement).

Davide Agnolazza

Comment 11 Davide Agnolazza 2010-02-03 17:54:26 UTC
Created attachment 388577 [details]
Patch starting from 5.4 original fence_rsb version with another bug fixed. See commento 10 for info

Mi fix starts on line 303.

As you can see, I commented the original sys.exit(result)

This COULD NOT be a definitive fix.

Comment 12 Marek Grac 2010-02-05 17:30:43 UTC
@Davide: Sorry, I'm not sure if I understand your new problem. If you believe it is a bug feel free to create a new bugzilla entry for it.

In general those patches are not intended to be used directly (sometimes they works, sure). You should ask GSS for hotfix or you can take version directly from upstream. We are working on separating fencing and resource agents from a rest of cluster suite, so you should be able to upgrade it without worrying about rest of your cluster.

Comment 13 Chris Ward 2010-02-11 10:06:09 UTC
~~ Attention Customers and Partners - RHEL 5.5 Beta is now available on RHN ~~

RHEL 5.5 Beta has been released! There should be a fix present in this 
release that addresses your request. Please test and report back results 
here, by March 3rd 2010 (2010-03-03) or sooner.

Upon successful verification of this request, post your results and update 
the Verified field in Bugzilla with the appropriate value.

If you encounter any issues while testing, please describe them and set 
this bug into NEED_INFO. If you encounter new defects or have additional 
patch(es) to request for inclusion, please clone this bug per each request
and escalate through your support representative.

Comment 14 Chris Ward 2010-02-24 14:42:26 UTC
@Marek, 

Could you or someone else confirm whether or not this issue has been tested and verified as fixed?

Also, Comment #11, does it indicate that this issue is not fixed?

Comment 16 Marek Grac 2010-02-24 15:02:22 UTC
@Chris: 

I have tested it on a real machine and it works. 

Comment #11 is talking about possibility to apply proposed patch to older version of fence agent.

Comment 17 Davide Agnolazza 2010-02-24 17:41:42 UTC
Actually I can't test the new release because the only Fujitzu machine I have are a critical production environment so I'll continue to run my own patch.

Anyway, Marek is right! I was asking for a patch compatible with the actual stable version of cman (in the rhel 5.4 repository).

@Marek: As you can see in Comment #10 I made another fix in the original script. Was it fixed in the new 5.5 version or do I have to open another bug?

Thanks
Davide

Comment 18 Marek Grac 2010-03-03 10:46:38 UTC
@Davide:

Problem should be fixed in 5.5

Comment 23 errata-xmlrpc 2010-03-30 08:41: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-2010-0266.html