ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpapirkovs...@apache.org
Subject [1/4] ambari git commit: AMBARI-22026. Restart of all components on host operation failed with 500 status code. (mpapirkovskyy)
Date Mon, 25 Sep 2017 16:11:19 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.6 68b31ac2c -> 1cf1a2cec
  refs/heads/trunk 999daefe0 -> 4b59ba820


AMBARI-22026. Restart of all components on host operation failed with 500 status code. (mpapirkovskyy)


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

Branch: refs/heads/branch-2.6
Commit: 1a867723b62abd1706cc1d088502f1973c7ccfba
Parents: 68b31ac
Author: Myroslav Papirkovskyi <mpapyrkovskyy@hortonworks.com>
Authored: Mon Sep 25 19:08:49 2017 +0300
Committer: Myroslav Papirkovskyi <mpapyrkovskyy@hortonworks.com>
Committed: Mon Sep 25 19:08:49 2017 +0300

----------------------------------------------------------------------
 .../AmbariCustomCommandExecutionHelper.java         | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1a867723/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
index 2b2144c..5f26565 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
@@ -1527,14 +1527,18 @@ public class AmbariCustomCommandExecutionHelper {
     if (actionName.equals(START_COMMAND_NAME) || actionName.equals(RESTART_COMMAND_NAME))
{
       Cluster cluster = clusters.getCluster(clusterName);
       StackId stackId = null;
-      try {
-        Service service = cluster.getService(serviceName);
-        stackId = service.getDesiredStackId();
-      } catch (AmbariException e) {
-        LOG.debug("Could not load service {}, skipping topology check", serviceName);
-        stackId = cluster.getDesiredStackVersion();
+      if (serviceName != null) {
+        try {
+          Service service = cluster.getService(serviceName);
+          stackId = service.getDesiredStackId();
+        } catch (AmbariException e) {
+          LOG.debug("Could not load service {}, skipping topology check", serviceName);
+        }
       }
 
+      if (stackId == null) {
+        stackId = cluster.getDesiredStackVersion();
+      }
 
       AmbariMetaInfo ambariMetaInfo = managementController.getAmbariMetaInfo();
 


Mime
View raw message