You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2017/09/26 22:26:25 UTC
[26/50] [abbrv] ambari git commit: AMBARI-22026. Restart of all
components on host operation failed with 500 status code. (mpapirkovskyy)
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/0393451c
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0393451c
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0393451c
Branch: refs/heads/branch-3.0-ams
Commit: 0393451c43fe06b7cac72afebd2109d9298197a8
Parents: 999daef
Author: Myroslav Papirkovskyi <mp...@hortonworks.com>
Authored: Mon Sep 25 19:08:49 2017 +0300
Committer: Myroslav Papirkovskyi <mp...@hortonworks.com>
Committed: Mon Sep 25 19:10:24 2017 +0300
----------------------------------------------------------------------
.../AmbariCustomCommandExecutionHelper.java | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/0393451c/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 38a02ef..d0dd7e0 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
@@ -1524,14 +1524,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();