ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gau...@apache.org
Subject ambari git commit: AMBARI-15760. Add show_logs routines to Ranger Tagsync start/stop (Mugdha Varadkar via gborad)
Date Wed, 13 Apr 2016 14:11:14 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 6f340ec2d -> 10f824bee


AMBARI-15760. Add show_logs routines to Ranger Tagsync start/stop (Mugdha Varadkar via gborad)


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

Branch: refs/heads/trunk
Commit: 10f824beec67f851160f5be18a68e692159aaa3d
Parents: 6f340ec
Author: Gautam Borad <gautam@apache.org>
Authored: Mon Apr 11 16:49:00 2016 +0530
Committer: Gautam Borad <gautam@apache.org>
Committed: Wed Apr 13 19:41:01 2016 +0530

----------------------------------------------------------------------
 .../RANGER/0.4.0/package/scripts/ranger_service.py  | 16 +++++++++-------
 .../0.4.0/package/scripts/setup_ranger_xml.py       | 15 +++++++--------
 2 files changed, 16 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/10f824be/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_service.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_service.py
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_service.py
index 9f4757b..e8effb8 100644
--- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_service.py
+++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_service.py
@@ -35,8 +35,6 @@ def ranger_service(name, action=None):
       raise
   elif name == 'ranger_usersync':
     no_op_test = format('ps -ef | grep proc_rangerusersync | grep -v grep')
-
-
     if params.stack_supports_usersync_non_root:
       try:
         Execute(params.usersync_start,
@@ -57,8 +55,12 @@ def ranger_service(name, action=None):
   elif name == 'ranger_tagsync' and params.stack_supports_ranger_tagsync:
     no_op_test = format('ps -ef | grep proc_rangertagsync | grep -v grep')
     cmd = format('{tagsync_bin} start')
-    Execute(cmd,
-      environment=env_dict,
-      user=params.unix_user,
-      not_if=no_op_test
-    )
\ No newline at end of file
+    try:
+      Execute(cmd,
+        environment=env_dict,
+        user=params.unix_user,
+        not_if=no_op_test
+      )
+    except:
+      show_logs(params.tagsync_log_dir, params.unix_user)
+      raise
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/10f824be/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 9544ee8..f3f9c7e 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
@@ -514,12 +514,11 @@ def setup_tagsync(upgrade_type=None):
          mode = 0640
     )
 
-  if os.path.isfile(tagsync_services_file):
-    File(tagsync_services_file,
-      mode = 0755,
-    )
+  File(tagsync_services_file,
+    mode = 0755,
+  )
 
-    Execute(('ln','-sf', format('{tagsync_services_file}'),'/usr/bin/ranger-tagsync'),
-      not_if=format("ls /usr/bin/ranger-tagsync"),
-      only_if=format("ls {tagsync_services_file}"),
-      sudo=True)
+  Execute(('ln','-sf', format('{tagsync_services_file}'),'/usr/bin/ranger-tagsync'),
+    not_if=format("ls /usr/bin/ranger-tagsync"),
+    only_if=format("ls {tagsync_services_file}"),
+    sudo=True)


Mime
View raw message