AMBARI-22279. Knox upgrade failed when migrating from IOP to HDP (adoroszlai)

(cherry picked from commit 0fc8e9036c198917cded91fff7aacb63b8bc27db)

Change-Id: I1bd321736283094173f156c88e15eec8da952885


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e738cdcd
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e738cdcd
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e738cdcd

Branch: refs/heads/AMBARI-2.6.0.0
Commit: e738cdcd6e4a16e07a4ebedba6145caec9e97fc0
Parents: 305fa46
Author: Attila Doroszlai <adorosz...@hortonworks.com>
Authored: Fri Oct 20 16:01:12 2017 +0200
Committer: adorosz...@hortonworks.com <jenk...@hortonworks.com>
Committed: Fri Oct 20 14:54:16 2017 +0000

----------------------------------------------------------------------
 .../common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py | 2 ++
 .../resources/stacks/BigInsights/4.0/configuration/cluster-env.xml | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e738cdcd/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
 
b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
index 7f2101d..da6a8a0 100644
--- 
a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
+++ 
b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
@@ -70,6 +70,8 @@ stack_supports_core_site_for_ranger_plugin = 
check_stack_feature(StackFeature.CO
 upgrade_from_version = upgrade_summary.get_source_version()
 
 source_stack = default("/commandParams/source_stack", None)
+if source_stack is None:
+  source_stack = upgrade_summary.get_source_stack("KNOX")
 source_stack_name = get_stack_name(source_stack)
 if source_stack_name is not None and source_stack_name != stack_name:
   source_stack_root = get_stack_root(source_stack_name, 
default('/configurations/cluster-env/stack_root', None))

http://git-wip-us.apache.org/repos/asf/ambari/blob/e738cdcd/ambari-server/src/main/resources/stacks/BigInsights/4.0/configuration/cluster-env.xml
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/BigInsights/4.0/configuration/cluster-env.xml
 
b/ambari-server/src/main/resources/stacks/BigInsights/4.0/configuration/cluster-env.xml
index 7c4a8a1..54e7f56 100755
--- 
a/ambari-server/src/main/resources/stacks/BigInsights/4.0/configuration/cluster-env.xml
+++ 
b/ambari-server/src/main/resources/stacks/BigInsights/4.0/configuration/cluster-env.xml
@@ -323,7 +323,7 @@ gpgcheck=0</value>
     <value>{"BigInsights":"/usr/iop"}</value>
     <description>JSON which defines the stack root by stack name</description> 
 
     <value-attributes>
-      <read-only>true</read-only>
+      <read-only>false</read-only>
       <overridable>false</overridable>
       <visible>false</visible>
     </value-attributes>

Reply via email to