qos driver api can have better error handling

Bug #1627749 reported by YAMAMOTO Takashi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-odl
Invalid
Medium
Manjeet Singh Bhatia
neutron
Fix Released
Medium
Miguel Angel Ajo

Bug Description

the current qos (notification) driver api assumes driver methods are async and always success.
however, it might not be the case for some of possible backends. eg. a controller based implementation, where a driver would make a rest api call to the backend.

- currently one of drivers raises an exception, the rest of drivers are simply skipped.
  it might not be what an api user would expect.

- whan driver calls end up with an error, the db changes should be reverted, or
  the resource should be marked "possibly not sync".

Tags: qos
tags: added: qos
Changed in neutron:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Miguel Angel Ajo (mangelajo) wrote :
Revision history for this message
Miguel Angel Ajo (mangelajo) wrote :

It's a tricky situation not fully resolved in ml2 or anywhere else.

What if a driver failed, but some other succeeded ?

Shall we revert them all, and then revert the DB? what if one of the reverts then fail?

I think that we should let the drivers report an error via an exception (without making other drivers fail), but at the same time, it should be the failed driver responsibility to track the need to resync such object when the backend comes back (otherwise the revert failure becomes an issue too).

Changed in neutron:
assignee: nobody → Miguel Angel Ajo (mangelajo)
Revision history for this message
Manjeet Singh Bhatia (manjeet-s-bhatia) wrote :

For networking-odl we have change documentation to configure driver properly,

Revision history for this message
Isaku Yamahata (yamahata) wrote :

networking-odl needs hooks that are called during db transaction.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

Reviewed: https://review.openstack.org/396651
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=38c1812015b6977f8212723d082222cefb0926e6
Submitter: Jenkins
Branch: master

commit 38c1812015b6977f8212723d082222cefb0926e6
Author: Miguel Angel Ajo <email address hidden>
Date: Thu Nov 17 09:17:29 2016 -0500

    Transition qos notification driver into qos driver

    This will deprecate the notification_driver config setting,
    and no config setting will be needed.

    Also it lays down the foundation for a more decoupled interaction
    with mechanism drivers.

    Closes-Bug: #1657379
    Related-Bug: #1627749
    DocImpact

    Change-Id: I2f166a43f0b980ad22617f8a3f7b4cc7f4786c48

Changed in networking-odl:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Manjeet Singh Bhatia (manjeet-s-bhatia)
Changed in neutron:
status: Confirmed → Fix Released
Mike Kolesnik (mkolesni)
Changed in networking-odl:
status: Confirmed → Triaged
Changed in networking-odl:
status: Triaged → Invalid
Revision history for this message
Manjeet Singh Bhatia (manjeet-s-bhatia) wrote :

as notification driver is no longer in use https://review.openstack.org/#/c/454300/ so this is not valid now

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.