Bug 1162677

Summary: ambari_config_update cannot delete key
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Martin Kudlej <mkudlej>
Component: rhs-hadoop-installAssignee: Jeff Vance <jvance>
Status: CLOSED ERRATA QA Contact: Martin Kudlej <mkudlej>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rhgs-3.0CC: bchilds, eboyd, matt, nlevinki, rcyriac
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 3.0.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 2.37-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-31 10:18:30 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 Martin Kudlej 2014-11-11 12:55:41 UTC
Description of problem:
It is not possible to delete existing key with this script.

./ambari_config_update.sh --configkey key1 --action delete --cluster TestCluster
ERROR: {
  "status" : 400,
  "message" : "Invalid Request: Malformed Request Body.  An exception occurred parsing the request body: Unexpected character ('}' (code 125)): was expecting double-quote to start field name\n at [Source: java.io.StringReader@66c6733e; line: 1, column: 1040]"
}


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

How reproducible:
Add key1 with value1 to core-site configuration file. And then it is not possible to delete it by this script.

Comment 2 Jeff Vance 2014-11-11 21:11:56 UTC
When the key record was deleted the next record (which becomes the last key:value record in the file, has a trailing comman, which is illegal in xml.
Fixed bin/ambari_config_update.sh

Comment 5 Martin Kudlej 2015-03-11 13:27:09 UTC
Tested with rhs-hadoop-install-2_44-1.el6rhs.noarch and it works. --> VERIFIED

Comment 7 errata-xmlrpc 2015-03-31 10:18:30 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