Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B32FC18151 for ; Mon, 14 Dec 2015 14:14:47 +0000 (UTC) Received: (qmail 47233 invoked by uid 500); 14 Dec 2015 14:14:47 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 46300 invoked by uid 500); 14 Dec 2015 14:14:47 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 46244 invoked by uid 99); 14 Dec 2015 14:14:46 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Dec 2015 14:14:46 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id A4B322C1F6B for ; Mon, 14 Dec 2015 14:14:46 +0000 (UTC) Date: Mon, 14 Dec 2015 14:14:46 +0000 (UTC) From: "Andrew Onischuk (JIRA)" To: dev@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (AMBARI-14366) Create a script to allow config merge during Ambari takeover MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Andrew Onischuk created AMBARI-14366: ---------------------------------------- Summary: Create a script to allow config merge during Ambari takeover Key: AMBARI-14366 URL: https://issues.apache.org/jira/browse/AMBARI-14366 Project: Ambari Issue Type: Bug Reporter: Andrew Onischuk Assignee: Andrew Onischuk Fix For: 2.2.1 Attachments: AMBARI-14366.patch _Background_: * Paypal 900 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** _Tasks_: * 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: /tmp/my-master-configs/etc/hadoop/conf, /tmp/my-master-configs/etc/hbase/conf, /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 | | value | | propertyA | | 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 -- This message was sent by Atlassian JIRA (v6.3.4#6332)