ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mug...@apache.org
Subject ambari git commit: AMBARI-21650: Ranger Usersync process starts with older stack script during cross stack upgrade (mugdha)
Date Fri, 04 Aug 2017 06:09:07 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 a43a9564c -> 20039679d


AMBARI-21650: Ranger Usersync process starts with older stack script during cross stack upgrade
(mugdha)


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

Branch: refs/heads/branch-2.5
Commit: 20039679dfb027c95d92407f6528a88bd2571488
Parents: a43a956
Author: Mugdha Varadkar <mugdha@apache.org>
Authored: Thu Aug 3 17:23:33 2017 +0530
Committer: Mugdha Varadkar <mugdha@apache.org>
Committed: Fri Aug 4 11:38:22 2017 +0530

----------------------------------------------------------------------
 .../RANGER/0.4.0/package/scripts/setup_ranger_xml.py           | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/20039679/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
index 2fa7b2f..35a0363 100644
--- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
+++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/setup_ranger_xml.py
@@ -527,6 +527,12 @@ def setup_usersync(upgrade_type=None):
     mode = 0755,
   )
 
+  if upgrade_type is not None and params.stack_supports_config_versioning:
+    if os.path.islink('/usr/bin/ranger-usersync'):
+      Link('/usr/bin/ranger-usersync', action="delete")
+
+    Link('/usr/bin/ranger-usersync', to=params.usersync_services_file)
+
   Execute(('ln','-sf', format('{usersync_services_file}'),'/usr/bin/ranger-usersync'),
     not_if=format("ls /usr/bin/ranger-usersync"),
     only_if=format("ls {usersync_services_file}"),


Mime
View raw message