Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 36fbb6163 -> 5db8b4af5


AMBARI-21039. Atlas web UI inaccessible after adding Atlas service on upgraded 
cluster with Hive because /etc/atlas/conf symlink was created ahead of time 
(alejandro)


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

Branch: refs/heads/branch-2.4
Commit: 5db8b4af5731a96be3b54545c1906e1dc36e8728
Parents: 36fbb61
Author: Alejandro Fernandez <[email protected]>
Authored: Thu May 18 12:11:31 2017 -0400
Committer: Alejandro Fernandez <[email protected]>
Committed: Thu May 18 12:11:31 2017 -0400

----------------------------------------------------------------------
 .../libraries/functions/conf_select.py                 | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/5db8b4af/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
----------------------------------------------------------------------
diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
index 8d54053..ddd6ef3 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
@@ -356,11 +356,16 @@ def select(stack_name, package, version, try_create=True, 
ignore_errors=False):
               then the Atlas RPM will not be able to copy its artifacts into 
/etc/atlas/conf directory and therefore
               prevent Ambari from by copying those unmanaged contents into 
/etc/atlas/$version/0
               '''
-              parent_dir = os.path.dirname(current_dir)
-              if os.path.exists(parent_dir):
-                Link(conf_dir, to=current_dir)
+              component_list = default("/localComponents", [])
+              if "ATLAS_SERVER" in component_list or "ATLAS_CLIENT" in 
component_list:
+                Logger.info("Atlas is installed on this host.")
+                parent_dir = os.path.dirname(current_dir)
+                if os.path.exists(parent_dir):
+                  Link(conf_dir, to=current_dir)
+                else:
+                  Logger.info("Will not create symlink from {0} to {1} because 
the destination's parent dir does not exist.".format(conf_dir, current_dir))
               else:
-                Logger.info("Will not create symlink from {0} to {1} because 
the destination's parent dir does not exist.".format(conf_dir, current_dir))
+                Logger.info("Will not create symlink from {0} to {1} because 
Atlas is not installed on this host.".format(conf_dir, current_dir))
             else:
               # Normal path for other packages
               Link(conf_dir, to=current_dir)

Reply via email to