diff options
Diffstat (limited to 'dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager')
2 files changed, 7 insertions, 3 deletions
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])) { diff --git a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/bin/manager.sh b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/bin/manager.sh index 4bf41b1..f20ffd9 100644 --- a/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/bin/manager.sh +++ b/dcae-controller-service-cdap/dcae-controller-service-cdap-cluster/dcae-controller-service-cdap-cluster-manager/src/main/server/bin/manager.sh @@ -22,9 +22,13 @@ VMTYPE=$(ls /tmp/vm-*manager.properties | sed s/-manager.properties// | sed sx/t case $CMD1 in start) CLUSTER_FILE=data/resources/cluster.json + if [ -e config/version.json ]; then + rm -rf data/resources/configuration/version* + cp config/version.json data/resources/configuration/ + fi if [ ! -e $CLUSTER_FILE ]; then mkdir -p $(dirname $CLUSTER_FILE) - echo '{ "baseUrl": "http://localhost:10000/v3", "pollingFrequency": "30000" }' > $CLUSTER_FILE + echo '{ "baseUrl": "http://localhost:10000/v3", "pollingFrequency": "30000", "$version": "ONAP-R2" }' > $CLUSTER_FILE fi JVMARGS=$(cat config/manager.properties | grep JVMARGS | sed 's/[^=]*=//') $CMD $CMD1 $JVMARGS |