Commit 356efa39 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

cyclades: Allow deletion of ports from deleted VMs

Fix corner case where a port seems to be still attached to a VM although
the VM has already been deleted.
parent 0a81db18
......@@ -542,7 +542,8 @@ def delete_port(port):
"""
if port.machine is not None:
vm = port.machine
if vm is not None and not vm.deleted:
vm = disconnect(port.machine, port)
log.info("Removing port %s, Job: %s", port, vm.task_job_id)
else:
......
......@@ -250,6 +250,8 @@ class Omit(object):
def wait_server_task(server, wait, stdout):
jobID = server.task_job_id
if jobID is None:
return
if wait:
msg = "Issued job '%s'. Waiting to complete...\n"
stdout.write(msg % jobID)
......
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