diff options
author | juraj.linkes <jlinkes@cisco.com> | 2017-04-04 15:04:47 +0200 |
---|---|---|
committer | juraj.linkes <jlinkes@cisco.com> | 2017-05-03 15:23:35 +0200 |
commit | e385c470ca3c58d5038d50a86380847bb6a5a56b (patch) | |
tree | 24d04da8a20290de37053589fdba9cc31d9e6b70 /scripts/flush_odl.sh | |
parent | d00c547178fdf5637a3b42112f5c3e6ae29fb260 (diff) |
Reworked helper scripts and fixed typos
Added scripts for odl handling
Change-Id: Idf715e1c8357a52ef1cd93f58b87c0b92211f85b
Signed-off-by: juraj.linkes <jlinkes@cisco.com>
Diffstat (limited to 'scripts/flush_odl.sh')
-rwxr-xr-x | scripts/flush_odl.sh | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/scripts/flush_odl.sh b/scripts/flush_odl.sh new file mode 100755 index 0000000..11d8f80 --- /dev/null +++ b/scripts/flush_odl.sh @@ -0,0 +1,44 @@ +#!/bin/bash +script_dir=$(dirname $0) +. $script_dir/variables.sh + +echo "WARNING: this script doesn't install odl features; It assumes features are already configured in $ODL_ROOT/etc/org.apache.karaf.features.cfg" +echo "WARNING: this script also doesn't configure logging; You can configure logging in $ODL_ROOT/etc/org.ops4j.pax.logging.cfg" +echo + +echo "Stopping odl on all nodes" +$script_dir/service.sh opendaylight stop + +echo "Waiting 10 seconds for odl to stop" +for i in {1..10} +do + echo -n "." + sleep 1 +done + +echo + +odl_hostnames=$(grep -Eo 'overcloud-controller-[0-9]' /etc/hosts) + +echo +for odl_hostname in $odl_hostnames +do + echo "Removing data, journal, snapshots and instances on $odl_hostname" + ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $odl_hostname rm -rf $odl_dir/data $odl_dir/journal $odl_dir/snapshots $odl_dir/instances 2> /dev/null +done + +echo + +echo "Starting odl on all nodes" +$script_dir/service.sh opendaylight start + +echo "Waiting 20 seconds for odl to start" +for i in {1..20} +do + echo -n "." + sleep 1 +done + +echo +echo +$script_dir/remount_vpp_into_odl.sh |