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

Fix #1574 & #1575 #1576

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions IM/connectors/OpenStack.py
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ def delete_networks(self, driver, inf):
driver.ex_delete_network(ost_net)

if router and router.name == "im-%s" % inf.id:
driver.ex_delete_router(router.name)
driver.ex_delete_router(router)

return res, msg

Expand Down Expand Up @@ -2106,13 +2106,13 @@ def delete_elastic_ips(self, node, vm):
except Exception as ex:
self.log_warn("Error detaching Floating IP: %s. %s" % (floating_ip.ip_address,
get_ex_error(ex)))
# if it is in the list do not release it
if floating_ip.ip_address in no_delete_ips:
self.log_debug("Do not remove Floating IP: %s" % floating_ip.ip_address)
else:
self.log_debug("Remove Floating IP: %s" % floating_ip.ip_address)
# delete the ip
floating_ip.delete()
# if it is in the list do not release it
if floating_ip.ip_address in no_delete_ips:
self.log_debug("Do not remove Floating IP: %s" % floating_ip.ip_address)
else:
self.log_debug("Remove Floating IP: %s" % floating_ip.ip_address)
# delete the ip
floating_ip.delete()
return True, ""
except Exception as ex:
self.log_exception("Error removing Floating IPs to VM ID: " + str(vm.id))
Expand Down