Revision e6f6627c

b/snf-cyclades-app/synnefo/logic/backend.py
220 220
    if status == 'success' and state_for_success is not None:
221 221
        back_network.operstate = state_for_success
222 222

  
223
    if status in ('canceled', 'error') and opcode == 'OP_NETWORK_CREATE':
223
    if status in ('canceled', 'error') and opcode == 'OP_NETWORK_ADD':
224 224
        utils.update_state(back_network, 'ERROR')
225 225
        back_network.backendtime = etime
226 226

  
......
250 250

  
251 251
    all_equal = len(set(backend_states)) <= 1
252 252
    network.state = all_equal and backend_states[0] or 'PENDING'
253

  
254 253
    # Release the resources on the deletion of the Network
255 254
    if old_state != 'DELETED' and network.state == 'DELETED':
256 255
        log.info("Network %r deleted. Releasing link %r mac_prefix %r",
......
270 269
        network.serial = serial
271 270
        serial.accepted = True
272 271
        serial.save()
273

  
274 272
    network.save()
275 273

  
276 274

  
b/snf-cyclades-app/synnefo/logic/callbacks.py
51 51
    @wraps(func)
52 52
    def wrapper(client, message, *args, **kwargs):
53 53
        try:
54
            msg = None
54 55
            msg = json.loads(message['body'])
55 56
            func(msg)
56 57
            client.basic_ack(message)
......
62 63
                      e, message)
63 64
            client.basic_nack(message)
64 65
        except Exception as e:
65
            log.exception("Unexpected error: %s, msg: %s", e, msg)
66
            if msg:
67
                log.exception("Unexpected error: %s, msg: %s", e, msg)
68
            else:
69
                log.exception("Unexpected error: %s", e)
66 70
            client.basic_reject(message)
67 71

  
68 72
    return wrapper
b/snf-cyclades-app/synnefo/logic/management/commands/reconcile-servers.py
177 177

  
178 178
            unsynced_nics = reconciliation.unsynced_nics(DBNics, GNics)
179 179
            if len(unsynced_nics) > 0:
180
                print >> sys.stderr, "The NICs of servers with the folloing IDs "\
180
                print >> sys.stderr, "The NICs of servers with the following IDs "\
181 181
                                     "are unsynced:"
182 182
                for id, nics in unsynced_nics.items():
183 183
                    print ''.ljust(2) + '%6d:' % id

Also available in: Unified diff