Bug 1281371 - Cluster Properties page in web UI needs an overhaul
Cluster Properties page in web UI needs an overhaul
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pcs (Show other bugs)
7.2
Unspecified Unspecified
high Severity unspecified
: rc
: ---
Assigned To: Ondrej Mular
cluster-qe@redhat.com
:
Depends On: 1281463
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-12 07:04 EST by Tomas Jelinek
Modified: 2016-11-03 16:55 EDT (History)
5 users (show)

See Also:
Fixed In Version: pcs-0.9.151-1.el7
Doc Type: Bug Fix
Doc Text:
Cause: Available cluster properties were hard-coded in pcsd. Also they were loaded from GUI node. Consequence: In GUI user could change only few cluster properties. Fix: Load available properties from pacemaker on cluster nodes. Result: In GUI there are basic cluster properties. Other (advanced) properties can be displayed by clicking on button "Show advanced settings".
Story Points: ---
Clone Of:
: 1298163 (view as bug list)
Environment:
Last Closed: 2016-11-03 16:55:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tomas Jelinek 2015-11-12 07:04:30 EST
1. Definition of the Properties are hard-coded in web UI. It should be read from pacemaker instead as different versions of pacemaker can have different sets of properties.
2. Default values of the properties are read from UI local node instead of a cluster node.
3. The page should be rendered in JS (at the same level as the rest of the UI) instead of sending a complete HTML page from the server.
4. Consider AJAX loading and saving of the properties.

Note:
There is a lot of cluster properties so we can utilize a tabbed layout. We may also want to place default resource options and operations to a tab on this page.
Comment 1 Ondrej Mular 2016-01-13 08:23:50 EST
proposed fix:
https://github.com/feist/pcs/commit/750a095fa919951432c5202caa0b0f09bfdc23a0

Test:

Pcs verifies type of property value:
[root@rhel7-node1 ~]# pcs property set enable-acl=invalid_value
Error: invalid value of property: 'enable-acl=invalid_value', (use --force to override)
[root@rhel7-node1 ~]# pcs property set enable-acl=invalid_value --force
[root@rhel6-node1 ~]# pcs property | grep enable-acl
 enable-acl: invalid_value
[root@rhel7-node1 ~]# pcs property set enable-acl=true --force
[root@rhel7-node1 ~]# pcs property | grep enable-acl
 enable-acl: true


There is new pcsd request which returns definition of cluster properties:
1. create auth token for local pcsd
[root@rhel7-node1 ~]# pcs cluster auth localhost
Username: hacluster
Password: 
localhost: Authorized

2. get token for localhost from /var/lib/pcsd/tokens
3.
[root@rhel7-node1 ~]# curl -sk -b 'token=<token_from_step_#2>' https://localhost:2224/remote/get_cluster_properties_definition
{
...
"enable-acl": {"name": "enable-acl", "default": "false", "readable_name": "Enable ACLs", "source": "cib", "shortdesc": "Enable CIB ACL", "type": "boolean", "longdesc": "", "advanced": false},
...
}

Log in into GUI, select cluster, and then open tab "CLUSTER PROPERTIES". There are listed basic cluster properties. Advanced properties could be shown by clicking on "Show advanced settings" button.
Comment 2 Mike McCune 2016-03-28 19:15:27 EDT
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune@redhat.com with any questions
Comment 3 Ivan Devat 2016-05-31 08:09:03 EDT
Before fix:
[vm-rhel72-1 ~] $ rpm -q pcs
pcs-0.9.143-15.el7.x86_64

1) pcs part
[vm-rhel72-1 ~] $ pcs property set enable-acl=invalid_value
[vm-rhel72-1 ~] $ pcs property | grep enable-acl
 enable-acl: invalid_value
[vm-rhel72-1 ~] $ pcs property set enable-acl=true
[vm-rhel72-1 ~] $ pcs property | grep enable-acl
 enable-acl: true

2) pcsd part
1. create auth token for local pcsd
[vm-rhel72-1 ~] $ pcs cluster auth localhost
Username: hacluster
Password:
localhost: Authorized
2. get token for localhost from /var/lib/pcsd/tokens
3. get url
[vm-rhel72-1 ~] $ curl -sk -b 'token=<token_from_step_#2>' https://localhost:2224/remote/get_cluster_properties_definition
Unknown Request

3) web ui part
Log in into GUI, select cluster, and then open tab "CLUSTER PROPERTIES". There are listed basic cluster properties. No advanced properties are here.

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

1) pcs part
[vm-rhel72-1 ~] $ pcs property set enable-acl=invalid_value
Error: invalid value of property: 'enable-acl=invalid_value', (use --force to override)
[vm-rhel72-1 ~] $ pcs property set enable-acl=invalid_value --force
[vm-rhel72-1 ~] $ pcs property | grep enable-acl
 enable-acl: invalid_value
[vm-rhel72-1 ~] $ pcs property set enable-acl=true
[vm-rhel72-1 ~] $ pcs property | grep enable-acl
 enable-acl: true
 
2) pcsd part
1. create auth token for local pcsd
[vm-rhel72-1 ~] $ pcs cluster auth localhost
Username: hacluster
Password:
localhost: Authorized
2. get token for localhost from /var/lib/pcsd/tokens
3. get url
[vm-rhel72-1 ~] $ curl -sk -b 'token=ff78348c-6da4-492d-a23b-f14dc34ea7f4' https://localhost:2224/remote/get_cluster_properties_definition
{
...
"enable-acl": {"name": "enable-acl", "default": "false", "readable_name": "Enable ACLs", "source": "cib", "shortdesc": "Enable CIB ACL", "type": "boolean", "longdesc": "", "advanced": false}
...
}

3) web ui part
Log in into GUI, select cluster, and then open tab "CLUSTER PROPERTIES". There are listed basic cluster properties. Advanced properties could be shown by clicking on "Show advanced settings" button.
Comment 9 errata-xmlrpc 2016-11-03 16:55:42 EDT
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

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