Removing a openstack-hypervisor unit does not clean up the resources correctly.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Snap |
New
|
Undecided
|
Unassigned |
Bug Description
When removing an `openstack-
Given these variables:
```
export JUJU_MODEL=
MACHINE=6
HYPERVISOR_
MACHINE_FQDN=$(juju ssh $MACHINE hostname --fqdn | tr -d '\r')
```
Removing the unit will require manual cleanup.
```
juju remove-unit $HYPERVISOR_UNIT
```
This is the manual cleanup required:
```
# Delete VMs from the API.
SERVERS=$(openstack server list --all --host $MACHINE_FQDN -f value -c ID)
for server in $SERVERS; do
openstack server delete $server
done
# Delete VMs in the machine through Virsh.
juju ssh $MACHINE '
sudo openstack-
for cmd in destroy undefine; do
sudo openstack-
done
done
'
# Remove the compute service.
COMPUTE_
openstack compute service delete $COMPUTE_SERVICE
```
description: | updated |