Closed bengland2 closed 6 years ago
You can use linode-destroy.py
to delete linodes. linode-nuke.py
is to just reset the linodes to no disks/config so that you can start with a clean slate without getting charged for destroying the node and immediately starting a new one. In practice, nuking only saves money with smaller clusters and not much at that.
Also, this was mean to be driven by launch.sh
which deletes the ansible_inventory when you use the --nuke
option. (linode-*py doesn't know anything about ansible and I'd like to keep it that way).
OK, I misunderstood what it was for, withdrawing this PR.
linode-nuke.py now deletes the ansible inventory file if it exists. This is important because otherwise launch.sh won't create new linodes (apparently expects them to already be there) if inventory file exists.
Also, linode-nuke.py now deletes the linodes themselves. This is important so that we don't leave the nodes lying around and get charged for them. Also, if we want to launch with a bigger or smaller configuration, it's easier if none of the old nodes are still around.
In some cases, I get this error:
But it does power them all down and delete the disks. If you re-run linode-nuke.py after the nodes are all powered down, it will finish deleting them all.