Bug 1434972

Summary: Respect attributes obsoletes/deprecated for fence agents
Product: Red Hat Enterprise Linux 7 Reporter: Marek Grac <mgrac>
Component: pcsAssignee: Tomas Jelinek <tojeline>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact:
Priority: high    
Version: 7.4CC: anprice, bfrank, cfeist, cluster-maint, idevat, omular, rblough, rsteiger, sbradley, tojeline
Target Milestone: rcKeywords: EasyFix, Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.9.157-1.el7 Doc Type: Bug Fix
Doc Text:
Cause: The user creates a fence device in a cluster. Consequence: Pcs fails stating the user did not specified some of the device's required parameters. The same command was working before. It is because fence agents now may have more than one parameters for configuring the same option, one of the parameters obsoletes all others. Fix: Pcs ignores the new parameters so they are not required to be set. Result: It is possible to create a fence device using the same command as before.
Story Points: ---
Clone Of:
: 1436217 (view as bug list) Environment:
Last Closed: 2017-08-01 18:26:07 UTC Type: Bug
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: 1403028    
Bug Blocks:    
Attachments:
Description Flags
proposed fix none

Description Marek Grac 2017-03-22 19:05:32 UTC
Fence agents (from fence-agents-4.0.11-57.el7) have new attributes for <parameter> tag. 

deprecated="1" -> parameter will be removed one day (2020+)
obsoletes="old_name"

Comment 2 Tomas Jelinek 2017-03-27 07:57:29 UTC
Reproducer:

[root@rh73-node2:~]# rpm -q fence-agents-all
fence-agents-all-4.0.11-47.el7.x86_64
[root@rh73-node2:~]# pcs stonith create test fence_ilo
Error: required resource option 'login' is missing, use --force to override
[root@rh73-node2:~]# pcs stonith create test fence_ilo login=test
[root@rh73-node2:~]# echo $?
0
[root@rh73-node2:~]# pcs stonith show
 test   (stonith:fence_ilo):    Stopped



[root@rh73-node1:~]# rpm -q fence-agents-all
fence-agents-all-4.0.11-58.el7.x86_64
[root@rh73-node1:~]# pcs stonith create test fence_ilo
Error: required resource options 'login', 'username' are missing, use --force to override
[root@rh73-node1:~]# pcs stonith create test fence_ilo login=test
Error: required resource option 'username' is missing, use --force to override



For RHEL 7.4 we want to restore the behavior of fence-agents-all-4.0.11-47.el7. Pcs will not show nor require new options and will only work with the old (deprecated) options. In RHEL 7.5 the fence agents will do the validation and pcs will only need to handle displaying the options.

Comment 5 Tomas Jelinek 2017-03-27 13:21:34 UTC
Created attachment 1266654 [details]
proposed fix

Comment 6 Ivan Devat 2017-04-10 16:03:41 UTC
After Fix:

[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.157-1.el7.x86_64

[vm-rhel72-1 ~] $ rpm -q fence-agents-all
fence-agents-all-4.0.11-58.el7.x86_64

[vm-rhel72-1 ~] $ pcs stonith create test fence_ilo
Error: required resource option 'login' is missing, use --force to override
[vm-rhel72-1 ~] $ pcs stonith create test fence_ilo login=test
[vm-rhel72-1 ~] $ echo $?
0

Comment 10 errata-xmlrpc 2017-08-01 18:26:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1958

Comment 11 Ryan 2017-10-24 15:04:22 UTC
*** Bug 1505540 has been marked as a duplicate of this bug. ***