You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by dm...@apache.org on 2015/08/25 12:48:53 UTC
[1/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)
Repository: ambari
Updated Branches:
refs/heads/branch-2.1 e712f3109 -> 44488a54c
refs/heads/trunk 2e4c07853 -> 8b82c1bd8
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/44488a54
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/44488a54
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/44488a54
Branch: refs/heads/branch-2.1
Commit: 44488a54c92fcfc213e6ef9b029c833be8ea0ba5
Parents: e712f31
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Tue Aug 25 13:47:57 2015 +0300
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Tue Aug 25 13:47:57 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/44488a54/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/44488a54/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"
}
},
[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)
Posted by dm...@apache.org.
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 <dl...@hortonworks.com>
Authored: Tue Aug 25 13:47:57 2015 +0300
Committer: Lisnichenko Dmitro <dl...@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"
}
},