Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5D83110009 for ; Wed, 4 Mar 2015 18:39:44 +0000 (UTC) Received: (qmail 11899 invoked by uid 500); 4 Mar 2015 18:39:43 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 11845 invoked by uid 500); 4 Mar 2015 18:39:43 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 11785 invoked by uid 99); 4 Mar 2015 18:39:43 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Mar 2015 18:39:43 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8EBC1E102B; Wed, 4 Mar 2015 18:39:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dmitriusan@apache.org To: commits@ambari.apache.org Date: Wed, 04 Mar 2015 18:39:46 -0000 Message-Id: In-Reply-To: <3cab422850fd420d8ed165cfe589dce7@git.apache.org> References: <3cab422850fd420d8ed165cfe589dce7@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [4/4] ambari git commit: AMBARI-9905. Client configs downloaded from host and from ui are not the same for Oozie (dlysnichenko) AMBARI-9905. Client configs downloaded from host and from ui are not the same for Oozie (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/16a97aac Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/16a97aac Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/16a97aac Branch: refs/heads/trunk Commit: 16a97aaceeb406d6df64326126c60981f645dd3f Parents: 04d63af Author: Lisnichenko Dmitro Authored: Wed Mar 4 20:37:12 2015 +0200 Committer: Lisnichenko Dmitro Committed: Wed Mar 4 20:39:22 2015 +0200 ---------------------------------------------------------------------- .../OOZIE/4.0.0.2.0/package/scripts/oozie_client.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/16a97aac/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_client.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_client.py b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_client.py index faa326a..d0e6dad 100644 --- a/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_client.py +++ b/ambari-server/src/main/resources/common-services/OOZIE/4.0.0.2.0/package/scripts/oozie_client.py @@ -24,7 +24,7 @@ from resource_management import * from oozie import oozie from oozie_service import oozie_service - + class OozieClient(Script): def get_stack_to_component(self): @@ -57,6 +57,16 @@ class OozieClient(Script): Logger.info("Executing Oozie Client Rolling Upgrade pre-restart") Execute(format("hdp-select set oozie-client {version}")) - + # We substitute some configs (oozie.authentication.kerberos.principal) before generation (see oozie.py and params.py). + # This function returns changed configs (it's used for config generation before config download) + def generate_configs_get_xml_file_content(self, filename, dictionary): + if dictionary == 'oozie-site': + import params + config = self.get_config() + return {'configurations': params.oozie_site, + 'configuration_attributes': config['configuration_attributes'][dictionary]} + else: + return super(OozieClient, self).generate_configs_get_xml_file_content(filename, dictionary) + if __name__ == "__main__": OozieClient().execute()