ml2 plugin update operations

Bug #1227336 reported by Mohammad Banikazemi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Mohammad Banikazemi

Bug Description

Error handling for update operations (update_network, update_port, and update_subnet) are not implemented yet and are marked as TODO items. Here is the TODO comment for update_network:

        # TODO(apech) - handle errors raised by update_network, potentially
        # by re-calling update_network with the previous attributes. For
        # now the error is propogated to the caller, which is expected to
        # either undo/retry the operation or delete the resource.

Since here we need to deal with errors raised by update_network_postcommit (all other errors were caught earlier), shouldn't the assumption be that the mechanism driver has to deal with its own rollback? Here we only need to rollback the operations performed by the plugin (such as the db update). If that is the case, then recalling update_network won't be what we need. Recalling update_network may also lead to an infinite loop.

One possible solution would be something like this:

        try:
           self.mechanism_manager.update_network_postcommit(mech_context)
        except ml2_exc.MechanismDriverError:
           # rollback the db using the original network info and
           # similarly deal with _process_l3_update, etc

Perhaps similar or better solutions are in the works by apech and others. If not and if this approach sounds reasonable I can make the changes.

Changed in neutron:
assignee: nobody → Mohammad Banikazemi (mb-s)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

tags: added: ml2
Kyle Mestery (mestery)
Changed in neutron:
importance: Undecided → Low
Changed in neutron:
importance: Low → Medium
Changed in neutron:
milestone: none → icehouse-3
Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-3 → icehouse-rc1
Revision history for this message
Mark McClain (markmcclain) wrote :

This is not a release blocker. If it merges before Icehouse closes, I will retarget back to Icehouse.

Changed in neutron:
milestone: icehouse-rc1 → none
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Kyle Mestery (mestery)
tags: added: folsom-backport-potential
tags: added: icehouse-backport-potential
removed: folsom-backport-potential
tags: added: icehouse-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/83217
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=820399eb4dbb3b6ceebd5c50de10028ec7bf199f
Submitter: Jenkins
Branch: master

commit 820399eb4dbb3b6ceebd5c50de10028ec7bf199f
Author: Mohammad Banikazemi <email address hidden>
Date: Wed Mar 26 16:56:38 2014 -0400

    Deals with fails in update_*_postcommit ops

    It makes all mechanism drivers called even when one
    of the mechanism drivers fails during a post commit
    operation for updating network/subnet/port. This is
    a stopgap measure until a more comprehensive approach
    is adopted and implemented.

    Change-Id: Ia9080a91ce768d4007b0525548acfe7443a2973c
    Partial-Bug: 1227336

Thierry Carrez (ttx)
tags: removed: icehouse-rc-potential
Revision history for this message
Mohammad Banikazemi (mb-s) wrote :

A short term fix was merged on 2014-04-08. For a long term solution BP/spec is to be created for supporting a "sync" operation in mechanism drivers. Therefore, I am closing this bug (as discussed in ML2 IRC meeting on 2014-05-28).

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

Change abandoned by Mohammad Banikazemi (<email address hidden>) on branch: master
Review: https://review.openstack.org/69792
Reason: A new approach for resolving this problem is being considered. In particular, a "sync" operation between the Neutron ML2 plugin and backend controllers is being worked out (by sukhdev and rkukura). Therefore, I am going to mark this patch as abandoned.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers