diff options
author | 2017-05-18 10:25:43 +0200 | |
---|---|---|
committer | 2017-06-02 14:03:43 +0200 | |
commit | c0b072ee944330f97e7eb3b03df79bf9494e6b9a (patch) | |
tree | 3d7317eb0b71099932736f4fbd35df680996b077 /scripts/flush_odl.sh | |
parent | 6ad0c96f1b4383c3bcd651cc246843119f4e0e61 (diff) |
Added script for resource cleanup
This script can be either run from jumphost or overcloud nodes.
If run from jumphost, it will clean all resources on all nodes as well
as openstack resources.
If run from an overcloud node, it will clean resources on that node.
The script supports whitelisting and exclusion of resources to be
cleaned.
Change-Id: I46c937dc31a1ed4b9be1d641183c9cc3b42bbb2d
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, 0 insertions, 44 deletions
diff --git a/scripts/flush_odl.sh b/scripts/flush_odl.sh deleted file mode 100755 index 11d8f80..0000000 --- a/scripts/flush_odl.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/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 |