From 53c392554299dc88080f8fb3c0e1442ffcd3bf6d Mon Sep 17 00:00:00 2001 From: Carsten Lund Date: Fri, 5 May 2017 00:57:20 +0000 Subject: [DCAE-15] Changes related to version 1.1 (3) Fix health check for cdap cluster manager Change-Id: I8e5679cdc0b7bd9a780e8b0ade65228cec3db063 Signed-off-by: Carsten Lund --- .../cdap/cluster/servers/manager/DcaeCdapClusterManagerProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main') diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProvider.java b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProvider.java index 772cf46..5680c6f 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProvider.java +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/java/org/openecomp/dcae/controller/service/cdap/cluster/servers/manager/DcaeCdapClusterManagerProvider.java @@ -52,8 +52,8 @@ public class DcaeCdapClusterManagerProvider extends DcaeVirtualMachineManagerPro @Override public HealthTestResponse test() { String s = run(o.getHealthCheckScript(), o.getTestTimeout()); - String a[] = s.split(":"); - int index = s.indexOf(":"); + String a[] = s.trim().split(":"); + int index = s.trim().indexOf(":"); String msg = index < 0 ? null : s.substring(index); HealthTestResponse res = ServiceFactory.eINSTANCE.createHealthTestResponse(); if ("GREEN".equalsIgnoreCase(a[0])) { -- cgit 1.2.3-korg