Revision 95aee02c logic/callbacks.py
b/logic/callbacks.py | ||
---|---|---|
40 | 40 |
|
41 | 41 |
_logger = log.get_logger("synnefo.dispatcher") |
42 | 42 |
|
43 |
|
|
43 | 44 |
def update_db(message): |
44 | 45 |
"""Process the status of a VM based on a ganeti status message""" |
45 | 46 |
_logger.debug("Processing ganeti-op-status msg: %s", message.body) |
... | ... | |
67 | 68 |
except VirtualMachine.InvalidBackendIdError: |
68 | 69 |
_logger.debug("Ignoring msg for unknown instance %s.", |
69 | 70 |
msg["instance"]) |
71 |
except VirtualMachine.InvalidBackendMsgError, e: |
|
72 |
_logger.debug("Ignoring msg of unknown type: %s.", e) |
|
70 | 73 |
except VirtualMachine.DoesNotExist: |
71 | 74 |
_logger.error("VM for instance %s with id %d not found in DB.", |
72 | 75 |
msg["instance"], vmid) |
... | ... | |
145 | 148 |
return |
146 | 149 |
|
147 | 150 |
if msg["vmid"] == "": |
148 |
_logger.error("Reconciliate message does not specify a VM id")
|
|
151 |
_logger.error("Reconciliation message does not specify a VM id")
|
|
149 | 152 |
return |
150 | 153 |
|
151 | 154 |
vm = VirtualMachine.objects.get(id=msg["vmid"]) |
Also available in: Unified diff