Bug 1434972 - Respect attributes obsoletes/deprecated for fence agents
Summary: Respect attributes obsoletes/deprecated for fence agents
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs
Version: 7.4
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
: 1505540 (view as bug list)
Depends On: 1403028
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-22 19:05 UTC by Marek Grac
Modified: 2018-04-18 02:22 UTC (History)
9 users (show)

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.
Clone Of:
: 1436217 (view as bug list)
Environment:
Last Closed: 2017-08-01 18:26:07 UTC
Target Upstream Version:


Attachments (Terms of Use)
proposed fix (11.81 KB, patch)
2017-03-27 13:21 UTC, Tomas Jelinek
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1200363 None None None 2019-06-27 09:32:13 UTC
Red Hat Bugzilla 1505540 None CLOSED fence_vmware_soap requires --force when configuring STONITH 2019-06-27 09:32:13 UTC
Red Hat Product Errata RHBA-2017:1958 normal SHIPPED_LIVE pcs bug fix and enhancement update 2017-08-01 18:09:47 UTC

Internal Links: 1200363 1505540

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. ***


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