You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ak...@apache.org on 2018/05/01 22:11:05 UTC

[ambari] branch trunk updated: AMBARI-23731. Restart required services results in restart NN twice (akovalenko)

This is an automated email from the ASF dual-hosted git repository.

akovalenko pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git


The following commit(s) were added to refs/heads/trunk by this push:
     new c49e770  AMBARI-23731. Restart required services results in restart NN twice (akovalenko)
c49e770 is described below

commit c49e7704b69b758ec315748b39307fec426f593d
Author: Aleksandr Kovalenko <ak...@apache.org>
AuthorDate: Mon Apr 30 20:48:08 2018 +0300

    AMBARI-23731. Restart required services results in restart NN twice (akovalenko)
---
 .../main/admin/federation/step4_controller.js      |  6 +++++-
 ambari-web/app/utils/ajax/ajax.js                  | 24 +++++++++++++++++++++-
 2 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/ambari-web/app/controllers/main/admin/federation/step4_controller.js b/ambari-web/app/controllers/main/admin/federation/step4_controller.js
index 7bc3a0a..970ecca 100644
--- a/ambari-web/app/controllers/main/admin/federation/step4_controller.js
+++ b/ambari-web/app/controllers/main/admin/federation/step4_controller.js
@@ -163,8 +163,12 @@ App.NameNodeFederationWizardStep4Controller = App.HighAvailabilityProgressPageCo
 
   restartAllServices: function () {
     App.ajax.send({
-      name: 'restart.allServices',
+      name: 'restart.custom.filter',
       sender: this,
+      data: {
+        filter: "HostRoles/component_name!=NAMENODE&HostRoles/cluster_name=" + App.get('clusterName'),
+        context: "Restart Required Services"
+      },
       success: 'startPolling',
       error: 'onTaskError'
     });
diff --git a/ambari-web/app/utils/ajax/ajax.js b/ambari-web/app/utils/ajax/ajax.js
index de62d5e..24e4034 100644
--- a/ambari-web/app/utils/ajax/ajax.js
+++ b/ambari-web/app/utils/ajax/ajax.js
@@ -2467,7 +2467,29 @@ var urls = {
           },
           "Requests/resource_filters": [
             {
-              "hosts_predicate": "HostRoles/stale_configs=true"
+              "hosts_predicate": "HostRoles/stale_configs=true&HostRoles/cluster_name=" + data.clusterName
+            }
+          ]
+        })
+      }
+    }
+  },
+
+  'restart.custom.filter': {
+    'real': "/clusters/{clusterName}/requests",
+    'mock': "",
+    'format': function (data) {
+      return {
+        type: 'POST',
+        data: JSON.stringify({
+          "RequestInfo": {
+            "command": "RESTART",
+            "context": data.context,
+            "operation_level": "host_component"
+          },
+          "Requests/resource_filters": [
+            {
+              "hosts_predicate": data.filter
             }
           ]
         })

-- 
To stop receiving notification emails like this one, please contact
akovalenko@apache.org.