make nvp plugin future version friendly

Bug #1217479 reported by Armando Migliaccio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Armando Migliaccio
Grizzly
Fix Released
Low
Armando Migliaccio

Bug Description

If we run the NVP plugin with a shiny new version of NVP we might get stacktraces like the following:

Traceback (most recent call last):
2013-08-27 10:39:58.131 8604 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/resource.py", line 84, in resource
2013-08-27 10:39:58.131 8604 TRACE neutron.api.v2.resource result = method(request=request, **args)
2013-08-27 10:39:58.131 8604 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/base.py", line 405, in create
2013-08-27 10:39:58.131 8604 TRACE neutron.api.v2.resource obj = obj_creator(request.context, **kwargs)
2013-08-27 10:39:58.131 8604 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/plugins/nicira/NeutronPlugin.py", line 1577, in create_router
2013-08-27 10:39:58.131 8604 TRACE neutron.api.v2.resource nexthop)
2013-08-27 10:39:58.131 8604 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/plugins/nicira/nvplib.py", line 90, in dispatch_version_dependent_function
2013-08-27 10:39:58.131 8604 TRACE neutron.api.v2.resource func = (NVPLIB_FUNC_DICT[func_name][v.major].get(v.minor) or
2013-08-27 10:39:58.131 8604 TRACE neutron.api.v2.resource KeyError: NN

Where NN is the version major that's missing from NVPLIB_FUNC_DICT. Currently we support 2.x and 3.x. But what happens when 4 or 5 come along? We can decide to assume the plugin is not supported on newer versions of the NVP platform, and fail gracefully, or we can fall back on a known version in the hope that backward compatibility is preserved. Either way, it'd be good not to leave this stacktrace as it is.

Tags: nicira
Changed in neutron:
assignee: nobody → Armando Migliaccio (armando-migliaccio)
Changed in neutron:
importance: Undecided → Low
status: New → Triaged
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/43941

Changed in neutron:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/43941
Committed: http://github.com/openstack/neutron/commit/80df449aa5a4753705b64cb68492508c91efd580
Submitter: Jenkins
Branch: master

commit 80df449aa5a4753705b64cb68492508c91efd580
Author: armando-migliaccio <email address hidden>
Date: Tue Aug 27 12:53:58 2013 -0700

    Make Neutron NVP plugin future-versions friendly

    This patch enables the plugin to deal correctly with
    newer versions of the NVP platform; this is done by
    allowing the plugin to fall back to the closest known
    version of the NVP platform. This is acceptable behavior
    as L2/L3 operations implemented by the platform are most
    certainly backward compatible.

    This patch also improves test coverage for this part of the
    code, which is critical to the correct behavior of the plugin.

    Fixes bug #1217479

    Change-Id: Ifcce47c6ee2bc2bc96ddfe9298d252700aceca3f

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
milestone: none → havana-3
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
tags: added: grizzly-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/50734

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/grizzly)

Reviewed: https://review.openstack.org/50734
Committed: http://github.com/openstack/neutron/commit/c57c0fa3e9497c4312e1d29b23a80c696a2338a3
Submitter: Jenkins
Branch: stable/grizzly

commit c57c0fa3e9497c4312e1d29b23a80c696a2338a3
Author: armando-migliaccio <email address hidden>
Date: Tue Aug 27 12:53:58 2013 -0700

    Make Quantum NVP plugin future-versions friendly

    This patch enables the plugin to deal correctly with
    newer versions of the NVP platform; this is done by
    allowing the plugin to fall back to the closest known
    version of the NVP platform. This is acceptable behavior
    as L2/L3 operations implemented by the platform are most
    certainly backward compatible.

    This patch also improves test coverage for this part of the
    code, which is critical to the correct behavior of the plugin.

    Fixes bug #1217479

    Conflicts:

     neutron/tests/unit/nicira/test_nvplib.py
     quantum/plugins/nicira/nicira_nvp_plugin/nvplib.py

    Change-Id: Idddad8b0a5a1709683611bac6f239b18f90ee99b

tags: added: in-stable-grizzly
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-3 → 2013.2
Alan Pevec (apevec)
tags: removed: grizzly-backport-potential in-stable-grizzly
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.