Bug 532920

Summary: Fence agents should accept unknown options from standard input
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.4CC: cluster-maint, djansa, edamato, jkortus
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: cman-2.0.115-30.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-30 08:41:37 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:

Description Marek Grac 2009-11-04 10:51:05 UTC
libefence added new option 'nodename' to every query, as most of the agents
does not need such feature, we will ignore it. Unknown options from STDIN where
handled differently before.

New policy: fence agent should accept unknown args from STDIN. It can print on STDERR warning that it is ignoring that option.

Comment 5 Jaroslav Kortus 2010-03-04 19:18:09 UTC
Now it looks much better and the agents are ignoring unknown options.

during the testing following misbehaviour was detected:
[root@z2 ~]# echo -e "agent = agent\n node = fff\n verbose = 1\n fixed = yes\n ipaddr = 1.2.3.4\n" | fence_gnbd
failed: invalid input: ''

[root@z2 ~]# fence_sanbox2 
  File "/sbin/fence_sanbox2", line 16
    $FENCE_RELEASE_NAME="2.0.115";
    ^
SyntaxError: invalid syntax

[root@z2 ~]# echo -e "ipaddr = 1.2.3.4\n" | fence_ipmilan
failed: no IP address specified
(this seems to be related to the spaces around '=' which according to manpage are not forbidden and other agents do not have problem with that).

Shall we copy that to other BZ's?

As it works as promised and these findings are not related to this BZ, I'm marking it as verified.

Comment 6 Marek Grac 2010-03-05 06:41:11 UTC
sanbox2 is already reported in rhbz#549113.

imho spaces should be forbidden. But as most of the people use fence agents throught cman where configuration is stored in xml file this is handled elsewhere. Please copy it to new bug - we can fix it for next update (not a blocker)

Comment 8 errata-xmlrpc 2010-03-30 08:41:37 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