Fedora Account System
Red Hat Associate
Red Hat Customer
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.
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
Tested with rhs-hadoop-install-2_44-1.el6rhs.noarch and it works. --> VERIFIED
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