diff options
author | Markos Chandras <mchandras@suse.de> | 2017-02-02 15:18:09 +0000 |
---|---|---|
committer | Trevor Bramwell <tbramwell@linuxfoundation.org> | 2017-08-11 12:56:12 -0700 |
commit | 8d98b892c75c4581595192956f05ea9970055309 (patch) | |
tree | 114ae16deff5d021d587903a2ffeaa1ce1461858 | |
parent | 253119bac5d2e27cbca1006729190053f6016f79 (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>
-rwxr-xr-x | bifrost/scripts/destroy-env.sh | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/bifrost/scripts/destroy-env.sh b/bifrost/scripts/destroy-env.sh index 9920046e..ba761c2c 100755 --- a/bifrost/scripts/destroy-env.sh +++ b/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 |