Bug 1163669 - cannot remove all occurrences of value from list of values by ambari_config_update.sh
Summary: cannot remove all occurrences of value from list of values by ambari_config_u...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: rhs-hadoop-install
Version: rhgs-3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: RHGS 3.0.4
Assignee: Jeff Vance
QA Contact: Martin Kudlej
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-13 09:17 UTC by Martin Kudlej
Modified: 2015-05-13 17:53 UTC (History)
6 users (show)

Fixed In Version: 2.36
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-31 10:18:32 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2015:0761 0 normal SHIPPED_LIVE Red Hat Storage Server 3 Hadoop plug-in enhancement update 2015-03-31 14:17:20 UTC

Description Martin Kudlej 2014-11-13 09:17:53 UTC
Description of problem:
Please see 
https://bugzilla.redhat.com/show_bug.cgi?id=1151219#c4
and
https://bugzilla.redhat.com/show_bug.cgi?id=1151219#c7
and
https://bugzilla.redhat.com/show_bug.cgi?id=1151219#c8

Version-Release number of selected component (if applicable):
Ambari 1.6.1
rhs-hadoop-install-2_29-1

How reproducible:
100%

Steps to Reproduce:
1. Define example value: value1,value2,value200,value4,value5
2. try to remove value2 and value1 and value5
3. check results

Actual results:
It is not possible to remove values from value list from beginning and end of list

Comment 2 Jeff Vance 2014-11-13 16:55:21 UTC
I did the following:
    bin/ambari_config_update.sh --configkey key1 --action add --configvalue value1,value2,value200,value4,value5 --cluster cluster1 --debug
    bin/ambari_config_update.sh --configkey key1 --action remove --configvalue value2 --cluster cluster1 --debug
    bin/ambari_config_update.sh --configkey key1 --action remove --configvalue value1 --cluster cluster1 --debug
    bin/ambari_config_update.sh --configkey key1 --action remove --configvalue value5 --cluster cluster1 --debug

And the result after 3 "removes":
########## new property:
{ "Clusters": { "desired_config": {"type": "core-site", "tag":"version1415897389001", "properties" : { "fs.AbstractFileSystem.glusterfs.impl" : "org.apache.hadoop.fs.local.GlusterFs", "fs.default.name" : "glusterfs:///localhost:8020", "fs.defaultFS" : "glusterfs:///localhost:8020", "fs.glusterfs.impl" : "org.apache.hadoop.fs.glusterfs.GlusterFileSystem", "fs.glusterfs.volume.fuse.HadoopVol" : "/mnt/glusterfs/HadoopVol", "fs.glusterfs.volume.fuse.gv0" : "/mnt/gv0", "fs.glusterfs.volumes" : "HadoopVol,gv0", "hadoop.proxyuser.falcon.groups" : "users", "hadoop.proxyuser.falcon.hosts" : "*", "hadoop.proxyuser.hcat.groups" : "users", "hadoop.proxyuser.hcat.hosts" : "yarn.vm", "hadoop.proxyuser.hive.groups" : "users", "hadoop.proxyuser.hive.hosts" : "yarn.vm", "key1" : "value200,value4" } }}}

Note "key1" : "value200,value4" as expected.

The remove action is only able to remove one token in the value string per invocation. You are not able to remove "value1,value2" for example.
The script is working how it was intened to work.

Setting status==NOTABUG. Please change back if I have misunderstood the issue.

Comment 3 Martin Kudlej 2014-11-25 06:58:15 UTC
I think we have to verify this for next version. -->MODIFIED

Comment 6 Jeff Vance 2014-11-25 07:34:08 UTC
The script should be tested, of course. I am commenting that if there is a test case to verify the removal of more than a single token from a property value then that test case should be expected to fail. And, yes, this is all post GA version.

Comment 9 Martin Kudlej 2015-03-11 13:48:54 UTC
Tested with rhs-hadoop-install-2_44-1.el6rhs.noarch ant it works. --> VERIFIED

Comment 11 errata-xmlrpc 2015-03-31 10:18:32 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/RHEA-2015-0761.html


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