ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmitriu...@apache.org
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)
Date Tue, 25 Aug 2015 10:48:54 GMT
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 <dlysnichenko@hortonworks.com>
Authored: Tue Aug 25 13:47:57 2015 +0300
Committer: Lisnichenko Dmitro <dlysnichenko@hortonworks.com>
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"
           }
         },


Mime
View raw message