Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openstack-terminate should clean up floating IPs for deleted instances. #195

Open
etsauer opened this issue Jun 27, 2016 · 1 comment
Open

Comments

@etsauer
Copy link
Contributor

etsauer commented Jun 27, 2016

@vvaldez

@vvaldez
Copy link
Contributor

vvaldez commented Jun 27, 2016

Agree, will submit PR for this.

vvaldez added a commit to vvaldez/rhc-ose that referenced this issue Jun 28, 2016
vvaldez added a commit to vvaldez/rhc-ose that referenced this issue Jun 28, 2016
Also addressed the following issues encountered while testing this PR:
* It is possible for an instance to not have a floating IP for whatever reason (such as manually deallocating or releasing the IP), in this case SSH will not work to the instance so it will not be included in the host group to attempt subscription manager unregister, but will still be deleted
* It is possible that an instance will have a volume created but not attached. In this case as a precautionary measure I am excluding these unattached volumes from the deletion in case this was intentionally detached to preserve data. We can further discuss if this should be a parameter to override instead or if we need to change this behavior.
* Excluded instances in ERROR state as they will most likely not delete. We can discuss if this should be parameterized instead.
* Changed default ansible_ssh_user to cloud-user in line with our images
* Add check for and set_fact if Neutron is in use which is used by several tasks
* Add count for ips and volumes to display since these may not always be the same as instance count
* Enhance displayed warning/note message to include new counts
* Add check for valid item when attempting to delete objects
vvaldez added a commit to vvaldez/rhc-ose that referenced this issue Jun 28, 2016
Also addressed the following issues encountered while testing this PR:
* It is possible for an instance to not have a floating IP for whatever reason (such as manually deallocating or releasing the IP), in this case SSH will not work to the instance so it will not be included in the host group to attempt subscription manager unregister, but will still be deleted
* It is possible that an instance will have a volume created but not attached. In this case as a precautionary measure I am excluding these unattached volumes from the deletion in case this was intentionally detached to preserve data. We can further discuss if this should be a parameter to override instead or if we need to change this behavior.
* Excluded instances in ERROR state as they will most likely not delete. We can discuss if this should be parameterized instead.
* Changed default ansible_ssh_user to cloud-user in line with our images
* Add check for and set_fact if Neutron is in use which is used by several tasks
* Add count for ips and volumes to display since these may not always be the same as instance count
* Enhance displayed warning/note message to include new counts
* Add check for valid item when attempting to delete objects
vvaldez added a commit to vvaldez/rhc-ose that referenced this issue Jun 29, 2016
* Add check for and set_fact if Neutron is in use which is used by several tasks
* This PR was originally longer and contained the now split off PR rhtconsulting#197
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants