aboutsummaryrefslogtreecommitdiffstats
path: root/installation
diff options
context:
space:
mode:
authorPatrick Brady <pb071s@att.com>2017-04-20 11:02:28 -0700
committerPatrick Brady <pb071s@att.com>2017-04-20 11:02:41 -0700
commit91031e9de87b2655b8684ac854e3415982b3a68f (patch)
treec49867139cd7c9561d58df9c85b5904a0e8dddfb /installation
parent9039e84fe39fcb947f40101cc0f91d9d2fe003fc (diff)
Modify installFeatures.sh script
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: I31d7e365fd528d015f1d4d07a7f67f55c058d1d0 Signed-off-by: Patrick Brady <pb071s@att.com>
Diffstat (limited to 'installation')
-rw-r--r--installation/appc/src/main/scripts/installFeatures.sh20
1 files changed, 17 insertions, 3 deletions
diff --git a/installation/appc/src/main/scripts/installFeatures.sh b/installation/appc/src/main/scripts/installFeatures.sh
index ebf6dad..5e3557e 100644
--- a/installation/appc/src/main/scripts/installFeatures.sh
+++ b/installation/appc/src/main/scripts/installFeatures.sh
@@ -4,6 +4,20 @@ ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
APPC_HOME=${APPC_HOME:-/opt/openecomp/appc}
APPC_FEATURE_DIR=${APPC_FEATURE_DIR:-${APPC_HOME}/features}
+function featureInstall {
+COUNT=0
+while [ $COUNT -lt 10 ]; do
+ ${ODL_HOME}/bin/client -u karaf feature:install $1 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
+}
+
APPC_FEATURES=" \
appc-provider \
appc-event-listener \
@@ -18,9 +32,9 @@ APPC_FEATURES=" \
appc-asdc-listener"
echo "Enabling core APP-C features"
-${ODL_HOME}/bin/client -u karaf feature:install odl-netconf-connector-all
-${ODL_HOME}/bin/client -u karaf feature:install odl-restconf-noauth
-${ODL_HOME}/bin/client -u karaf feature:install odl-netconf-topology
+featureInstall odl-netconf-connector-all
+featureInstall odl-restconf-noauth
+featureInstall odl-netconf-topology
# When the karaf netconf feature gets installed, need to replace default password with OpenECOMP APP-C ODL Password
sed -i 's/admin<\/password>/Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U<\/password>/' ${ODL_HOME}/etc/opendaylight/karaf/99-netconf-connector.xml