ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Onischuk" <>
Subject Re: Review Request 41348: Create a script to allow config merge during Ambari takeover
Date Mon, 14 Dec 2015 18:31:20 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Dec. 14, 2015, 6:31 p.m.)

Review request for Ambari and Sid Wagle.

Bugs: AMBARI-14366

Repository: ambari



  * a lot of node cluster Ambari takeover needs to address the problem of host based configs
merged to create default Ambari configs.
  * The scope of this task is to provide a script that reads a dir structure for all configs.
**For now only site.xml** since env files cannot be parsed, we might need to handle yaml files
in later version.
  * It produces a output of all the problems / conflicts found along with a configuration.json
which can be directly incorporated in a cluster **blueprint**


  * Please find the attached patch with a partial script that you can start from (Really basic
foundation patch).
  * Assume that user has copied all the configs in a directory, example:  
/etc/my-slave-configs/hadoop/conf and so on. (There could be 5 core-site from
different master / slave / client)

  * Parse these files and merge them into a map of configs that can be exported to json based
on following rules: 
    * If propertyA is found in core-site1 and core-site2 with same value, add it to the map
    * If propertyA is found in core-site1 only, add it to the map
    * If propertyA is found in core-site1 and core-site2 with different value, add it to an
output file with same name as the config-type, as a conflict.  
Sample file (Choose appropriate formatting of choice) ::

                core-site-conflicts.txt ::
        || Conflicts ||
        | propertyA  | <path-to-config-file> | value |
        | propertyA  | <path-to-config-file> | value |

    * **Note**: Single run should generate all the conflicts, if no conflicts found generate
the json file
    * Provide ability to force output and also a verbose mode to log every step

Diffs (updated)

  ambari-server/src/main/resources/scripts/ PRE-CREATION 



mvn clean test


Andrew Onischuk

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message