From a8d6915645c780c9e0eef189fb72d45635b581a0 Mon Sep 17 00:00:00 2001 From: Patrick Brady Date: Tue, 18 Apr 2017 12:09:24 -0700 Subject: 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 --- .../src/main/resources/scripts/install-feature.sh | 24 ++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'appc-provider') diff --git a/appc-provider/appc-provider-installer/src/main/resources/scripts/install-feature.sh b/appc-provider/appc-provider-installer/src/main/resources/scripts/install-feature.sh index 1d769fada..aaa1911a4 100644 --- a/appc-provider/appc-provider-installer/src/main/resources/scripts/install-feature.sh +++ b/appc-provider/appc-provider-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 -- cgit 1.2.3-korg