Comment 0 for bug 1529326

Revision history for this message
Li Ma (nick-ma-z) wrote :

Here is the problem:

A network is created and written in neutron DB. At the meantime, Etcd cannot get the corresponding key 'lswitch', which causes unable to create subnet for this network.

The log file says that Etcd was disconnected at the network creation.

AFAIK, if the operation on Etcd fails, the DB transaction should also be rollbacked at the neutron DB side to prevent from updating DB records.

The related code in dragonflow/neutron/plugin.py:

def create_network(self, context, network):
        with context.session.begin(subtransactions=True):
            result = super(DFPlugin, self).create_network(context,
                                                          network)
            self._process_l3_create(context, result, network['network'])

        return self.create_network_nb_api(result)