Commit e13dbdd6 authored by Ilias Tsitsimpis's avatar Ilias Tsitsimpis
Browse files

burnin: If machine is ERROR we cannot delete ports

If the machine is not in ACTIVE state we cannot delete its ports.
This patch changes burnin so when cleaning up stale servers
(where there is the possibility that the machine is not ACTIVE)
it will not try to disconnect the server from the public network.
The port will be destroyed by it self and we will delete the
stale floating IP afterwards.
parent 3b093e12
......@@ -150,10 +150,14 @@ class CycladesTests(BurninTests):
def _delete_servers(self, servers, error=False):
"""Deleting a number of servers in parallel"""
# Disconnect floating IPs
for srv in servers:
self.info("Disconnecting all floating IPs from server with id %s",
srv['id'])
self._disconnect_from_network(srv)
if not error:
# If there is the possibility for the machine to be in
# ERROR state we cannot delete its ports.
for srv in servers:
self.info(
"Disconnecting all floating IPs from server with id %s",
srv['id'])
self._disconnect_from_network(srv)
# Delete servers
for srv in servers:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment