Last active
February 5, 2021 21:59
-
-
Save cloudnull/6f4a076abb1891a1703fddf54981d128 to your computer and use it in GitHub Desktop.
TripleO Manual heat delete
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PW=$(sudo podman exec -ti $(sudo podman ps | awk '/heat_api$/ {print $1}') grep '^connection=mysql' /etc/heat/heat.conf | awk -F':' '{print $3}' | awk -F'@' '{print $1}') | |
export STACK=${STACK:-overcloud} | |
sudo podman exec -ti mysql bash -c "mysql -u heat -p${PW} heat -e \"delete from resource_data where resource_id in (select id from resource where stack_id in (select id from stack where name = '$STACK'));\"" | |
sudo podman exec -ti mysql bash -c "mysql -u heat -p${PW} heat -e \"delete from resource where stack_id in (select id from stack where name = '$STACK);\"" | |
sudo podman exec -ti mysql bash -c "mysql -u heat -p${PW} heat -e \"delete from event where stack_id in (select id from stack where name = '$STACK');\"" | |
sudo podman exec -ti mysql bash -c "mysql -u heat -p${PW} heat -e \"delete from stack where name = '$STACK';\"" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment