From c0b072ee944330f97e7eb3b03df79bf9494e6b9a Mon Sep 17 00:00:00 2001 From: "juraj.linkes" Date: Thu, 18 May 2017 10:25:43 +0200 Subject: 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 --- scripts/post_apex.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/post_apex.sh') diff --git a/scripts/post_apex.sh b/scripts/post_apex.sh index fc4276f..6f5b2f8 100755 --- a/scripts/post_apex.sh +++ b/scripts/post_apex.sh @@ -1,5 +1,5 @@ #!/bin/bash -. $(dirname "$0")/variables.sh +. $(dirname "$0")/lib.sh undercloud_ip=`arp -a | grep $(virsh domiflist undercloud | grep default | awk '{print $5}') | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"` #echo $undercloud_ip @@ -41,8 +41,8 @@ do echo "Copying overcloudrc to $node_name" scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $overcloudrc_path heat-admin@$node_ip:. 2> /dev/null ssh -oStrictHostKeyChecking=no heat-admin@$node_ip 'sudo cp /home/heat-admin/overcloudrc /root' 2> /dev/null - echo "Cloning fds repo on $node_name to /root/fds" - ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $node_name 'git clone https://gerrit.opnfv.org/gerrit/p/fds.git /root/fds' 2> /dev/null + echo "Cloning fds repo on $node_name to $overcloud_fds_repo_loc" + ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $node_name 'git clone https://gerrit.opnfv.org/gerrit/p/fds.git $overcloud_fds_repo_loc' 2> /dev/null if [[ $node_name = *'controller'* ]] then echo "Setting debugs for nova and neutron on $node_name" -- cgit 1.2.3-korg