Skip to content

Instantly share code, notes, and snippets.

@smurugap
Created April 9, 2018 22:16
Show Gist options
  • Save smurugap/30171f3a82c79af64d4b06fc05d93c50 to your computer and use it in GitHub Desktop.
Save smurugap/30171f3a82c79af64d4b06fc05d93c50 to your computer and use it in GitHub Desktop.
DB Changes to delete a heat stack manually.
mysql -hlocalhost -uroot -p$(cat /etc/contrail/mysql.token) -e "
use heat;
delete from resource_data where resource_id in (select id from resource where stack_id in (select id from stack where name = \"$project\"));
delete from resource where stack_id in (select id from stack where name = \"$project\");
delete from event where stack_id in (select id from stack where name = \"$project\");
delete from stack where name = \"$project\";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment