ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jai...@apache.org
Subject ambari git commit: AMBARI-19619. Ranger load balancer url needs to be updated for dependent properties during HA. (Vivek Ratnavel Subramanian via Jaimin)
Date Mon, 23 Jan 2017 19:17:15 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 dc98bff91 -> 44b1c059f


AMBARI-19619. Ranger load balancer url needs to be updated for dependent properties during
HA. (Vivek Ratnavel Subramanian via Jaimin)


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

Branch: refs/heads/branch-2.5
Commit: 44b1c059f1a07bada4e6eadec8ad92766ee6720c
Parents: dc98bff
Author: Jaimin Jetly <jaimin@hortonworks.com>
Authored: Mon Jan 23 11:16:51 2017 -0800
Committer: Jaimin Jetly <jaimin@hortonworks.com>
Committed: Mon Jan 23 11:17:10 2017 -0800

----------------------------------------------------------------------
 .../rangerAdmin/step4_controller.js             | 83 +++++++++++++++++++-
 ambari-web/app/messages.js                      |  2 +-
 2 files changed, 80 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/44b1c059/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step4_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step4_controller.js
b/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step4_controller.js
index b7818d9..b241707 100644
--- a/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step4_controller.js
+++ b/ambari-web/app/controllers/main/admin/highAvailability/rangerAdmin/step4_controller.js
@@ -51,11 +51,30 @@ App.RAHighAvailabilityWizardStep4Controller = App.HighAvailabilityProgressPageCo
   },
 
   onLoadConfigsTags: function (data) {
+    var urlParams = [];
+    urlParams.push('(type=admin-properties&tag=' + data.Clusters.desired_configs['admin-properties'].tag
+ ')');
+    var siteNamesToFetch = [
+      'ranger-hdfs-security',
+      'ranger-yarn-security',
+      'ranger-hbase-security',
+      'ranger-hive-security',
+      'ranger-knox-security',
+      'ranger-kafka-security',
+      'ranger-kms-security',
+      'ranger-storm-security',
+      'ranger-atlas-security'
+    ];
+    siteNamesToFetch.map(function(siteName) {
+      if(siteName in data.Clusters.desired_configs) {
+        urlParams.push('(type=' + siteName + '&tag=' + data.Clusters.desired_configs[siteName].tag
+ ')');
+      }
+    });
+
     App.ajax.send({
       name: 'reassign.load_configs',
       sender: this,
       data: {
-        urlParams: '(type=admin-properties&tag=' + data.Clusters.desired_configs['admin-properties'].tag
+ ')'
+        urlParams: urlParams.join('|')
       },
       success: 'onLoadConfigs',
       error: 'onTaskError'
@@ -63,14 +82,70 @@ App.RAHighAvailabilityWizardStep4Controller = App.HighAvailabilityProgressPageCo
   },
 
   onLoadConfigs: function (data) {
+    var configs = [];
+    var self = this;
     data.items.findProperty('type', 'admin-properties').properties['policymgr_external_url']
= this.get('content.loadBalancerURL');
-    var configData = this.reconfigureSites(['admin-properties'], data, Em.I18n.t('admin.highAvailability.step4.save.configuration.note').format(App.format.role('RANGER_ADMIN',
false)));
+    configs.push({
+      Clusters: {
+        desired_config: this.reconfigureSites(['admin-properties'], data, Em.I18n.t('admin.highAvailability.step4.save.configuration.note').format(App.format.role('RANGER_ADMIN',
false)))
+      }
+    });
+
+    var configsToChange = [
+      {
+        siteName: 'ranger-hdfs-security',
+        property: 'ranger.plugin.hdfs.policy.rest.url'
+      },
+      {
+        siteName: 'ranger-yarn-security',
+        property: 'ranger.plugin.yarn.policy.rest.url'
+      },
+      {
+        siteName: 'ranger-hbase-security',
+        property: 'ranger.plugin.hbase.policy.rest.url'
+      },
+      {
+        siteName: 'ranger-hive-security',
+        property: 'ranger.plugin.hive.policy.rest.url'
+      },
+      {
+        siteName: 'ranger-knox-security',
+        property: 'ranger.plugin.knox.policy.rest.url'
+      },
+      {
+        siteName: 'ranger-kafka-security',
+        property: 'ranger.plugin.kafka.policy.rest.url'
+      },
+      {
+        siteName: 'ranger-kms-security',
+        property: 'ranger.plugin.kms.policy.rest.url'
+      },
+      {
+        siteName: 'ranger-storm-security',
+        property: 'ranger.plugin.storm.policy.rest.url'
+      },
+      {
+        siteName: 'ranger-atlas-security',
+        property: 'ranger.plugin.atlas.policy.rest.url'
+      }
+    ];
+    configsToChange.map(function(item) {
+      var config = data.items.findProperty('type', item.siteName);
+      if(config) {
+        config.properties[item.property] = self.get('content.loadBalancerURL');
+        configs.push({
+          Clusters: {
+            desired_config: self.reconfigureSites([item.siteName], data, Em.I18n.t('admin.highAvailability.step4.save.configuration.note').format(App.format.role('RANGER_ADMIN',
false)))
+          }
+        });
+      }
+    });
 
     App.ajax.send({
-      name: 'common.service.configurations',
+      name: 'common.service.multiConfigurations',
       sender: this,
       data: {
-        desired_config: configData
+        configs: configs
       },
       success: 'onSaveConfigs',
       error: 'onTaskError'

http://git-wip-us.apache.org/repos/asf/ambari/blob/44b1c059/ambari-web/app/messages.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/messages.js b/ambari-web/app/messages.js
index a2a2fbf..bf3de62 100644
--- a/ambari-web/app/messages.js
+++ b/ambari-web/app/messages.js
@@ -1577,7 +1577,7 @@ Em.I18n.translations = {
   'admin.ra_highAvailability.wizard.step4.header': 'Install, Start and Test',
   'admin.ra_highAvailability.wizard.step4.task0.title': 'Stop All Services',
   'admin.ra_highAvailability.wizard.step4.task1.title': 'Install Additional Ranger Admin',
-  'admin.ra_highAvailability.wizard.step4.task2.title': 'Reconfigure Ranger',
+  'admin.ra_highAvailability.wizard.step4.task2.title': 'Reconfigure Services',
   'admin.ra_highAvailability.wizard.step4.task3.title': 'Start All Services',
   'admin.ra_highAvailability.wizard.step4.notice.inProgress': 'Please wait while Ranger Admin
HA is being deployed.',
   'admin.ra_highAvailability.wizard.step4.notice.completed': 'Ranger Admin HA has been enabled
successfully.',


Mime
View raw message