Commit 7a33fd43 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

Fix error state of BackendNetwork

parent b32362ae
......@@ -161,11 +161,10 @@ def process_network_status(back_network, etime, jobid, opcode, status, logmsg):
if opcode == 'OP_NETWORK_REMOVE':
back_network.deleted = True
if status in ('canceled', 'error'):
if status in ('canceled', 'error') and opcode == 'OP_NETWORK_CREATE':
utils.update_state(back_network, 'ERROR')
if (status == 'error' and opcode == 'OP_NETWORK_REMOVE' and
back_network.operstate == 'ERROR'):
if (status == 'error' and opcode == 'OP_NETWORK_REMOVE'):
back_network.deleted = True
back_network.operstate = 'DELETED'
......
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