Bug 1219574

Summary: [gui] resource optional arguments: quoted strings missing
Product: Red Hat Enterprise Linux 7 Reporter: Patrik Hagara <phagara>
Component: pcsAssignee: Ondrej Mular <omular>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact:
Priority: high    
Version: 7.2CC: cluster-maint, jpokorny, mlisik, tojeline
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: pcs-0.9.143-1.el7 Doc Type: Bug Fix
Doc Text:
Cause: Value of resource optional argument contains character '"'. Consequence: Web UI didn't show full value of attribute with character '"' Fix: Escaping spacial HTML characters. Result: Web UI shows arguments values properly.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 09:37:29 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:
Bug Depends On: 1189857    
Bug Blocks:    

Description Patrik Hagara 2015-05-07 16:47:22 UTC
Description of problem:
Double quotes along with everything in-between are not visible in resource optional argument text fields. Eg. when additional_parameters option of mysql resource is set to:
  <nvpair id="my-instance_attributes-additional_parameters" name="additional_parameters" value="--bind-address=&quot;;"/>

then the text field in pcs-gui contains just:

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
create resource with quotes in optional parameter

Actual results:
pcs-gui hides quotes and everything between them

Expected results:
show the same values as set in cib

Additional info:

Comment 2 Patrik Hagara 2015-05-07 16:59:53 UTC
pcs cli shows the correct values:

# pcs resource show my
 Resource: my (class=ocf provider=heartbeat type=mysql)
  Attributes: additional_parameters=--bind-address="" config=/etc/oh-my.cnf 
  Operations: start interval=0s timeout=120 (my-start-timeout-120)
              stop interval=0s timeout=120 (my-stop-timeout-120)
              monitor interval=20 timeout=30 (my-monitor-interval-20)
              monitor interval=10 role=Master timeout=30 (my-monitor-interval-10-role-Master)
              monitor interval=30 role=Slave timeout=30 (my-monitor-interval-30-role-Slave)
              promote interval=0s timeout=120 (my-promote-timeout-120)
              demote interval=0s timeout=120 (my-demote-timeout-120)

Comment 3 Jan Pokorný [poki] 2015-05-15 20:42:34 UTC
Cf. http://clusterlabs.org/pipermail/users/2015-May/000403.html

Comment 4 Tomas Jelinek 2015-08-10 13:20:18 UTC
Fixed in a complex rewrite of the resources page in the web UI, patches in bz1189857

Before Fix:
[root@rh71-node1 ~]# rpm -q pcs
[root@rh71-node1:~]# pcs resource create dummy0 Dummy fake=quoted\ \"test\"
Web UI shows an empty value of the fake attribute.

After Fix:
[root@rh71-node1:~]# rpm -q pcs
[root@rh71-node1:~]# pcs resource create dummy0 Dummy fake=quoted\ \"test\"
Web UI shows 'quoted "test"' as a value of the fake attribute.

Comment 8 errata-xmlrpc 2015-11-19 09:37:29 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.