summaryrefslogtreecommitdiffstats
path: root/prototypes/bifrost
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-02-02 15:18:09 +0000
committerMarkos Chandras <mchandras@suse.de>2017-02-02 15:18:09 +0000
commitaa9d01c7292f94c1a2c8354f559bd82a4ce0d2e0 (patch)
tree28cb8fc4550d8d631f6767d16633d7673ab32524 /prototypes/bifrost
parentd81e8fee012304f9ee99a6b099300dc1b62abfe4 (diff)
prototypes: bifrost: Drop the entire ironic database
There is no reason to only drop a few tables from it, so just drop the entire database. Change-Id: Iea9757fc5ccd85bc223d3c86d6a4c3ecf65fa130 Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'prototypes/bifrost')
-rwxr-xr-xprototypes/bifrost/scripts/destroy-env.sh7
1 files changed, 2 insertions, 5 deletions
diff --git a/prototypes/bifrost/scripts/destroy-env.sh b/prototypes/bifrost/scripts/destroy-env.sh
index 9920046e1..ba761c2c6 100755
--- a/prototypes/bifrost/scripts/destroy-env.sh
+++ b/prototypes/bifrost/scripts/destroy-env.sh
@@ -23,12 +23,9 @@ virsh undefine compute00.opnfvlocal || true
service ironic-conductor stop || true
-echo "removing from database"
+echo "removing ironic database"
if $(which mysql &> /dev/null); then
- mysql -u root ironic --execute "truncate table ports;"
- mysql -u root ironic --execute "delete from node_tags;"
- mysql -u root ironic --execute "delete from nodes;"
- mysql -u root ironic --execute "delete from conductors;"
+ mysql -u root ironic --execute "drop database ironic;"
fi
echo "removing leases"
[[ -e /var/lib/misc/dnsmasq/dnsmasq.leases ]] && > /var/lib/misc/dnsmasq/dnsmasq.leases