Cleanup floating IPs
Currently, temporary floating IPs are only cleaned up in stop_review
job in merge request pipeline at .gitlab-ci.yml#L397. That's assuming the pipeline didn't fail earlier and make it through deploying a review app and later stopped either automatically or manually.
When developing new feature, a lot of times the pipeline doesn't even make it through deploying a review app, and that leaves some lingering floating IPs. Therefore, I want to create script to delete those supposed to be temporary floating IPs in cleanup stage.
My proposed way of doing this in cheaha-cloud
project is to query floating Ips with:
openstack floating ip list --not-any-tags reserved --status DOWN
This approach assumes we have those "static" floating IPs tagged with reserved
.
Tagging floating IPs doesn't seem to be supported via WebUI so it does add an additional step to create a "static" floating Ip in the future.