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-16035. Add support for Rolling and Express Upgrade for Ranger Tagsync (Mugdha Varadkar via gautam)
Date Mon, 25 Apr 2016 05:09:45 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 67303c0db -> 004d49603


AMBARI-16035. Add support for Rolling and Express Upgrade for Ranger Tagsync (Mugdha Varadkar
via gautam)


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

Branch: refs/heads/trunk
Commit: 004d496038ed408f83ca7db5ba3f60b86d7ca123
Parents: 67303c0
Author: Gautam Borad <gautam@apache.org>
Authored: Sat Apr 23 16:11:16 2016 +0530
Committer: Gautam Borad <gautam@apache.org>
Committed: Mon Apr 25 10:39:26 2016 +0530

----------------------------------------------------------------------
 .../common-services/RANGER/0.4.0/package/scripts/params.py   | 3 +++
 .../RANGER/0.4.0/package/scripts/ranger_service.py           | 2 +-
 .../RANGER/0.4.0/package/scripts/ranger_tagsync.py           | 2 +-
 .../RANGER/0.4.0/package/scripts/setup_ranger_xml.py         | 7 +++----
 .../main/resources/stacks/HDP/2.5/services/stack_advisor.py  | 2 ++
 .../stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml       | 8 ++++++++
 .../main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml   | 7 +++++++
 7 files changed, 25 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/004d4960/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
index 175115d..bcbab42 100644
--- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/params.py
@@ -68,6 +68,8 @@ ranger_conf    = '/etc/ranger/admin/conf'
 ranger_ugsync_conf = '/etc/ranger/usersync/conf'
 ranger_tagsync_home  = format('{stack_root}/current/ranger-tagsync')
 ranger_tagsync_conf = format('{stack_root}/current/ranger-tagsync/conf')
+tagsync_bin = '/usr/bin/ranger-tagsync'
+tagsync_services_file = format('{stack_root}/current/ranger-tagsync/ranger-tagsync-services.sh')
 
 if upgrade_direction == Direction.DOWNGRADE and version and not check_stack_feature(StackFeature.CONFIG_VERSIONING,
version):
   stack_supports_rolling_upgrade = True
@@ -94,6 +96,7 @@ if stack_supports_ranger_tagsync:
   ranger_tagsync_home  = format('{stack_root}/current/ranger-tagsync')
   tagsync_bin = '/usr/bin/ranger-tagsync'
   ranger_tagsync_conf = format('{stack_root}/current/ranger-tagsync/conf')
+  tagsync_services_file = format('{stack_root}/current/ranger-tagsync/ranger-tagsync-services.sh')
 
 usersync_services_file = format('{stack_root}/current/ranger-usersync/ranger-usersync-services.sh')
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/004d4960/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 e8effb8..2c7bd3c 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
@@ -54,7 +54,7 @@ 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')
+    cmd = format('{tagsync_services_file} start')
     try:
       Execute(cmd,
         environment=env_dict,

http://git-wip-us.apache.org/repos/asf/ambari/blob/004d4960/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
index 1150461..1b56044 100644
--- a/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
+++ b/ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
@@ -52,7 +52,7 @@ class RangerTagsync(Script):
     import params
     env.set_params(params)
 
-    Execute(format('{tagsync_bin} stop'), environment={'JAVA_HOME': params.java_home}, user=params.unix_user)
+    Execute(format('{tagsync_services_file} stop'), environment={'JAVA_HOME': params.java_home},
user=params.unix_user)
     File(params.tagsync_pid_file,
       action = "delete"
     )

http://git-wip-us.apache.org/repos/asf/ambari/blob/004d4960/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 9f31983..d35738a 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
@@ -417,7 +417,6 @@ def setup_tagsync(upgrade_type=None):
   ranger_tagsync_conf = params.ranger_tagsync_conf
 
   tagsync_log4j_file = format('{ranger_tagsync_conf}/log4j.xml')
-  tagsync_services_file = format('{ranger_tagsync_home}/ranger-tagsync-services.sh')
 
   Directory(format("{ranger_tagsync_conf}"),
     owner = params.unix_user,
@@ -464,7 +463,7 @@ def setup_tagsync(upgrade_type=None):
   )
 
   if upgrade_type is not None:
-    src_file = format('{ranger_tagsync_home}/ews/webapp/WEB-INF/classes/conf.dist/log4j.xml')
+    src_file = format('{ranger_tagsync_home}/conf.dist/log4j.xml')
     dst_file = format('{tagsync_log4j_file}')
     Execute(('cp', '-f', src_file, dst_file), sudo=True)
 
@@ -472,7 +471,7 @@ def setup_tagsync(upgrade_type=None):
     File(tagsync_log4j_file, owner=params.unix_user, group=params.unix_group)
   else:
     Logger.warning('Required file {0} does not exist, copying the file to {1} path'.format(tagsync_log4j_file,
ranger_tagsync_conf))
-    src_file = format('{ranger_tagsync_home}/ews/webapp/WEB-INF/classes/conf.dist/log4j.xml')
+    src_file = format('{ranger_tagsync_home}/conf.dist/log4j.xml')
     dst_file = format('{tagsync_log4j_file}')
     Execute(('cp', '-f', src_file, dst_file), sudo=True)
     File(tagsync_log4j_file, owner=params.unix_user, group=params.unix_group)
@@ -487,7 +486,7 @@ def setup_tagsync(upgrade_type=None):
          mode = 0640
     )
 
-  File(tagsync_services_file,
+  File(params.tagsync_services_file,
     mode = 0755,
   )
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/004d4960/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
index 4da21fa..0dc92b1 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/services/stack_advisor.py
@@ -421,6 +421,8 @@ class HDP25StackAdvisor(HDP24StackAdvisor):
     servicesList = [service["StackServices"]["service_name"] for service in services["services"]]
 
     putTagsyncAppProperty = self.putProperty(configurations, "tagsync-application-properties",
services)
+    putTagsyncSiteProperty = self.putProperty(configurations, "ranger-tagsync-site", services)
+
     has_ranger_tagsync = False
     if 'RANGER' in servicesList:
       ranger_tagsync_host = self.__getHostsForComponent(services, "RANGER", "RANGER_TAGSYNC")

http://git-wip-us.apache.org/repos/asf/ambari/blob/004d4960/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
index 0e1b30c..2e5c002 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml
@@ -210,6 +210,7 @@
       <service name="RANGER">
         <component>RANGER_USERSYNC</component>
         <component>RANGER_ADMIN</component>
+        <component>RANGER_TAGSYNC</component>
       </service>
 
       <service name="RANGER_KMS">
@@ -313,6 +314,7 @@
       <service name="RANGER">
         <component>RANGER_ADMIN</component>
         <component>RANGER_USERSYNC</component>
+        <component>RANGER_TAGSYNC</component>
       </service>
     </group>
 
@@ -706,6 +708,12 @@
           <task xsi:type="restart-task"/>
         </upgrade>
       </component>
+
+      <component name="RANGER_TAGSYNC">
+        <upgrade>
+          <task xsi:type="restart-task"/>
+        </upgrade>
+      </component>
     </service>
 
     <service name="RANGER_KMS">

http://git-wip-us.apache.org/repos/asf/ambari/blob/004d4960/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml
index 7a6e302..1745de8 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.5.xml
@@ -128,6 +128,7 @@
       <service name="RANGER">
         <component>RANGER_ADMIN</component>
         <component>RANGER_USERSYNC</component>
+        <component>RANGER_TAGSYNC</component>
       </service>
     </group>
 
@@ -493,6 +494,12 @@
           <task xsi:type="restart-task" />
         </upgrade>
       </component>
+
+      <component name="RANGER_TAGSYNC">
+        <upgrade>
+          <task xsi:type="restart-task" />
+        </upgrade>
+      </component>
     </service>
 
     <service name="RANGER_KMS">


Mime
View raw message