aboutsummaryrefslogtreecommitdiffstats
path: root/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-installer/src/main
diff options
context:
space:
mode:
authorPatrick Brady <pb071s@att.com>2017-04-18 12:09:24 -0700
committerPatrick Brady <pb071s@att.com>2017-04-18 12:38:38 -0700
commita8d6915645c780c9e0eef189fb72d45635b581a0 (patch)
treed80138abe14d3f92852cf97c1b4faf682707dac7 /appc-adapters/appc-iaas-adapter/appc-iaas-adapter-installer/src/main
parent748257816069d1d0840f9cf18cbbb0c11bc387a3 (diff)
Modifying feature install scripts
Adding a while loop around each call to the opendaylight karaf client. If the client is not available it will try again up to 10 times. The new version of opendaylight seems to have delays after installing sdnc components which can cause errors for the appc components. These script changes fix allow the install script to wait for opendaylight to become available. Change-Id: Ib1bf6c7880398ac2ebe81eaff987ee4921cdb420 Signed-off-by: Patrick Brady <pb071s@att.com>
Diffstat (limited to 'appc-adapters/appc-iaas-adapter/appc-iaas-adapter-installer/src/main')
-rw-r--r--appc-adapters/appc-iaas-adapter/appc-iaas-adapter-installer/src/main/resources/scripts/install-feature.sh24
1 files changed, 22 insertions, 2 deletions
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-installer/src/main/resources/scripts/install-feature.sh b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-installer/src/main/resources/scripts/install-feature.sh
index 1d769fada..aaa1911a4 100644
--- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-installer/src/main/resources/scripts/install-feature.sh
+++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-installer/src/main/resources/scripts/install-feature.sh
@@ -36,5 +36,25 @@ else
exit 1
fi
-${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories}
-${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:install ${features.boot}
+COUNT=0
+while [ $COUNT -lt 10 ]; do
+ ${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories} 2> /tmp/installErr
+ cat /tmp/installErr
+ if grep -q 'Failed to get the session' /tmp/installErr; then
+ sleep 10
+ else
+ let COUNT=10
+ fi
+ let COUNT=COUNT+1
+done
+COUNT=0
+while [ $COUNT -lt 10 ]; do
+ ${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:install ${features.boot} 2> /tmp/installErr
+ cat /tmp/installErr
+ if grep -q 'Failed to get the session' /tmp/installErr; then
+ sleep 10
+ else
+ let COUNT=10
+ fi
+ let COUNT=COUNT+1
+done