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 2D8A318D9C for ; Tue, 25 Aug 2015 10:48:54 +0000 (UTC) Received: (qmail 69292 invoked by uid 500); 25 Aug 2015 10:48:54 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 69265 invoked by uid 500); 25 Aug 2015 10:48:54 -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 69255 invoked by uid 99); 25 Aug 2015 10:48:54 -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; Tue, 25 Aug 2015 10:48:54 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9293DE00C5; Tue, 25 Aug 2015 10:48:53 +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: Tue, 25 Aug 2015 10:48:54 -0000 Message-Id: <3ad18d5839c74cca984ccd5dc1dcb38a@git.apache.org> In-Reply-To: <372eca656f4f48608dadeb08e829e2a9@git.apache.org> References: <372eca656f4f48608dadeb08e829e2a9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [2/2] ambari git commit: AMBARI-12854. Stack Advisor doesn't propose hive.security.authorization.enabled set to true when hive_security_authorization is none (dlysnichenko) AMBARI-12854. Stack Advisor doesn't propose hive.security.authorization.enabled set to true when hive_security_authorization is none (dlysnichenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8b82c1bd Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8b82c1bd Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8b82c1bd Branch: refs/heads/trunk Commit: 8b82c1bd857946dc340a21a67b3d20a09b38e1c0 Parents: 2e4c078 Author: Lisnichenko Dmitro Authored: Tue Aug 25 13:47:57 2015 +0300 Committer: Lisnichenko Dmitro Committed: Tue Aug 25 13:48:52 2015 +0300 ---------------------------------------------------------------------- ambari-server/src/main/python/upgradeHelper.py | 13 ++++++++++++- .../upgrade/catalog/UpgradeCatalog_2.1_to_2.3.json | 1 - 2 files changed, 12 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/8b82c1bd/ambari-server/src/main/python/upgradeHelper.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/python/upgradeHelper.py b/ambari-server/src/main/python/upgradeHelper.py index 6fef036..5a24b6f 100644 --- a/ambari-server/src/main/python/upgradeHelper.py +++ b/ambari-server/src/main/python/upgradeHelper.py @@ -1519,13 +1519,17 @@ def get_ranger_service_details(): def get_hive_security_authorization_setting(): # this pattern should be used only once, changes here mimic UpgradeCatalog210.java -> updateRangerHiveConfigs + scf = Options.server_config_factory response = "None" + + if "hive-env" in scf.items() and "hive_security_authorization" in scf.get_config("hive-env").properties: + response = scf.get_config("hive-env").properties["hive_security_authorization"] + old_ranger_catalog = "ranger-hive-plugin-properties" old_ranger_setting = "ranger-hive-plugin-enabled" hive_server_catalog = "hiveserver2-site" hive_sec_property = "hive.security.authorization.enabled" - scf = Options.server_config_factory if scf is not None and old_ranger_catalog in scf.items(): cfg = scf.get_config(old_ranger_catalog) prop = cfg.properties @@ -1537,6 +1541,13 @@ def get_hive_security_authorization_setting(): if old_ranger_setting in prop: del prop[old_ranger_setting] + # workaround for buggy stack advisor + if "HIVE" in Options.SERVICES and response == "None": + if hive_server_catalog not in scf.items(): + scf.create_config(hive_server_catalog) + + scf.get_config(hive_server_catalog).properties[hive_sec_property] = "false" + return response http://git-wip-us.apache.org/repos/asf/ambari/blob/8b82c1bd/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.1_to_2.3.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.1_to_2.3.json b/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.1_to_2.3.json index 18ea6cd..75092f3 100644 --- a/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.1_to_2.3.json +++ b/ambari-server/src/main/resources/upgrade/catalog/UpgradeCatalog_2.1_to_2.3.json @@ -55,7 +55,6 @@ "hive_security_authorization": { "value": "{HIVE_SECURITY_AUTHORIZATION}", "template": "yes", - "override": "no", "resolve-dependency": "yes" } },