Bug 1231858

Summary: resource/fence agent options form needs an overhaul
Product: Red Hat Enterprise Linux 7 Reporter: Tomas Jelinek <tojeline>
Component: pcsAssignee: Ondrej Mular <omular>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 7.1CC: cluster-maint, idevat, jpokorny, lmiksik, omular, rsteiger, tlavigne, tojeline
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.9.152-9.el7 Doc Type: Bug Fix
Doc Text:
this bz doesn't need doc text
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-03 20:54:42 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:

Description Tomas Jelinek 2015-06-15 13:53:06 UTC
Fence agent form in pcsd web UI can be improved in several points:
- some options should have a checkbox or a combobox instead of a textfield
- options should be divided into three groups: basic, advanced, expert
- some options should not be displayed at all (action, version, help)
Fence agents should provide all information needed for this in their metadata.

Comment 1 Tomas Jelinek 2015-07-24 14:35:56 UTC
Maybe once reading of metadata through pacemaker (bz1188361) is implemented the options, which should not be displayed, will be filtered automatically by pacemaker.

We need to find out which options should not be displayed and editable, e.g. values of action and port may conflict with values provided by pacemaker when a fence agent is actually called from pacemaker.

Comment 4 Tomas Jelinek 2015-11-12 14:02:47 UTC
Currently the form is downloaded from a remote cluster node as a piece of HTML code and included into a resource page using AJAX. This causes issues when a gui host and a cluster node run different versions of pcs. There is also a rendering issue, as downloading the form takes some time.
The preferred solution is to get structured data via AJAX from a cluster node and render the form on the gui node in the same way as rest of the page.

Comment 5 Tomas Jelinek 2015-11-12 14:03:21 UTC
*** Bug 1281414 has been marked as a duplicate of this bug. ***

Comment 7 Ondrej Mular 2016-04-26 12:28:06 UTC
proposed changes:
https://github.com/feist/pcs/commit/381c526cdfc0e503172146c48ddcb10bf5f24b6f
https://github.com/feist/pcs/commit/f6982429b814556e9231625371df3c85b7c49413
https://github.com/feist/pcs/commit/b71274e573a80c5298a4ad11fd076ec0115c1d0e
https://github.com/feist/pcs/commit/0459ef8397ce266abd2973822bcba6c7c11cc94b

Test:
All changes in GUI are applicable on resource instance attributes (updating existing and creating new resource) and fence device instance attributes (updating existing and creating new fence device).
In GUI when managing cluster with older pcsd there is no visible change except that description is no more as a placeholder of instance attribute but description is displayed after mouse-over on info icon next to attribute name.
When managing cluster with new pcsd from GUI, there is same change as with older pcsd, and also these:
 * default value of attribute is displayed as placeholder of attribute value
 * fence device instance attributes "pcmk_host_map", "pcmk_host_list", "pcmk_host_check", "pcmk_delay_max" and "priority" were moved from advanced arguments to optional arguments
 * fence device instance attributes "debug", "action", "verbose", "version" and "help" are no more present, as there is no point of setting them

CLI commands affected by these changes:
 * pcs resource list
 * pcs resource describe
 * pcs resource create
 * pcs resource update
 * pcs stonith list
 * pcs stonith describe
 * pcs stonith create
 * pcs stonith update
Command 'pcs stonith describe <agent-name>' can show more specific information about some options. All other commands should work as before.

Comment 8 Ivan Devat 2016-05-31 12:11:48 UTC
Works as described in comment 7

Comment 11 Ivan Devat 2016-06-22 12:23:19 UTC
Before fix:
[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.151-1.el7.x86_64
[vm-rhel72-3 ~] $ pcs stonith
NO stonith devices configured
[vm-rhel72-3 ~] $ pcs stonith create xvm-fencing fence_xvm pcmk_host_map="vm-rhel72-1:vm.rhel72.1;vm-rhel72-3:vm.rhel72.3" action=monitor
Error: resource option(s): 'action', are not recognized for resource type: 'stonith:fence_xvm' (use --force to override)


After Fix:
[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.152-1.el7.x86_64

[vm-rhel72-3 ~] $ pcs stonith
NO stonith devices configured
[vm-rhel72-3 ~] $ pcs stonith create xvm-fencing fence_xvm pcmk_host_map="vm-rhel72-1:vm.rhel72.1;vm-rhel72-3:vm.rhel72.3" action=monitor
[vm-rhel72-3 ~] $ pcs stonith
 xvm-fencing    (stonith:fence_xvm):    Started vm-rhel72-3

Comment 12 Ivan Devat 2016-06-22 12:27:59 UTC
Before fix:
There is no optional argument "action" in web UI under tab FENCE DEVICES.

After fix:
There is optional argument "action" in web UI under tab FENCE DEVICES.

Comment 21 Tomas Jelinek 2016-09-13 11:48:26 UTC
additional fixes for compatibility with older pcsd versions:

- display resources as managed when pcsd does not provide managed/unmanaged status
https://github.com/ClusterLabs/pcs/commit/6007fba70212a184934c0c9e8763a300bcda0d45

- fix node standby/unstandby
https://github.com/ClusterLabs/pcs/commit/f1b60c3a2bace5d6a38a1b5e58f5b98aafbe5f70

Comment 27 errata-xmlrpc 2016-11-03 20:54:42 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://rhn.redhat.com/errata/RHSA-2016-2596.html