network creation error but it is recorded at neutron DB side.

Bug #1529326 reported by Li Ma
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DragonFlow
Fix Released
High
Li Ma

Bug Description

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. This causes inconsistency of DB backends.

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)

Li Ma (nick-ma-z)
description: updated
description: updated
Changed in dragonflow:
assignee: nobody → Li Ma (nick-ma-z)
Revision history for this message
Li Ma (nick-ma-z) wrote :

It is easy to reproduce.

1. kill etcd
2. run 'neutron net-create network11'
3. It shows neutron cannot create network.
4. run 'neutron net-list'

Li Ma (nick-ma-z)
Changed in dragonflow:
assignee: Li Ma (nick-ma-z) → nobody
Gal Sagie (gal-sagie)
Changed in dragonflow:
importance: Undecided → High
Li Ma (nick-ma-z)
Changed in dragonflow:
assignee: nobody → Li Ma (nick-ma-z)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to dragonflow (master)

Fix proposed to branch: master
Review: https://review.openstack.org/262423

Changed in dragonflow:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on dragonflow (master)

Change abandoned by Li Ma (<email address hidden>) on branch: master
Review: https://review.openstack.org/262423
Reason: a new spec is proposed.

Revision history for this message
Yuli (stremovsky) wrote :

This bug is replaced with the DB consistency and reliability specs. Can this bug be closed as invalid? Is there a duplicate?

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to dragonflow (master)

Reviewed: https://review.openstack.org/282290
Committed: https://git.openstack.org/cgit/openstack/dragonflow/commit/?id=3b92dc8eac33ad96b6cd40ad80427c9951444d99
Submitter: Jenkins
Branch: master

commit 3b92dc8eac33ad96b6cd40ad80427c9951444d99
Author: Li Ma <email address hidden>
Date: Thu Feb 18 10:30:42 2016 +0800

    Implement DB consistency

    It is a distributed lock based on SQL. Each lock is
    associated with a Neutron project(tenant) and a given
    API session. It ensures that a lock is acquired and
    released in the same API context.

    The detailed description is in the spec review.
    https://review.openstack.org/268005

    Closes-Bug: #1529812
    Closes-Bug: #1529326
    Closes-Bug: #1497676
    Related-Bug: #1527234
    Implements: blueprint bp/keep-db-consistency

    Change-Id: Iff916481282f2d60df66c0e916f3045f9944531e

Changed in dragonflow:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.