Commit 6ca730ea authored by Vangelis Koukis's avatar Vangelis Koukis
Browse files

Fix bug with servers in UNKNOWN API state

Fix bug with servers appearing in UNKNOWN state, in the
API response of GET /servers/detail.

The logic layer mishandled reception of a Ganeti-op-status message
when an OP_INSTANCE_QUERY_DATA operation was initiated by the Ganeti
admin.

Closes #573
parent f6ff7a6c
...@@ -31,7 +31,7 @@ def process_op_status(vm, jobid, opcode, status, logmsg): ...@@ -31,7 +31,7 @@ def process_op_status(vm, jobid, opcode, status, logmsg):
vm.backendlogmsg = logmsg vm.backendlogmsg = logmsg
# Notifications of success change the operating state # Notifications of success change the operating state
if status == 'success' and VirtualMachine.OPER_STATE_FROM_OPCODE is not None: if status == 'success' and VirtualMachine.OPER_STATE_FROM_OPCODE[opcode] is not None:
utils.update_state(vm, VirtualMachine.OPER_STATE_FROM_OPCODE[opcode]) utils.update_state(vm, VirtualMachine.OPER_STATE_FROM_OPCODE[opcode])
# Set the deleted flag explicitly, to cater for admin-initiated removals # Set the deleted flag explicitly, to cater for admin-initiated removals
if opcode == 'OP_INSTANCE_REMOVE': if opcode == 'OP_INSTANCE_REMOVE':
......
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