NEC Plugin: the plugin exposes wrong status of resources

Bug #1211319 reported by Ryota Mibu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Ryota Mibu

Bug Description

There are several problems of exposing resource status in NEC Plugin; 1) a status in response body is not updated in the operation, and 2) the plugin might overwrite ERROR status to ACTIVE or DOWN without any operations to the backend (OFC) which make the plugin expose wrong status.

We have to make sure that the plugin exposes right status in response body, and does not overwrite ERROR status until another operation to the backend has succeeded.

I confirmed the following symptoms, so we also need unit tests to verify that these are fixed:
1-a) While creating a network and operation to the backend has failed, the plugin returns status='ACTIVE' in the response body. It must be 'ERROR'.
1-b) When updating a network from admin_state_up=False to admin_state_up=True, the plugin returns status='DOWN' in a response body. However, the status is already updated to 'ACTIVE' in the DB, so I can get status='ACTIVE' after this activation.
1-c) When creating a port, the plugin always returns status='ACTIVE' in a response body even though status='DOWN'.
1-d) When updating a port from admin_state_up=False to admin_state_up=True and the creation of port on the backend has failed, the plugin returns status='DOWN' in a response body although the status is already updated to 'ERROR' in the DB.
2-a) When updating a port with admin_state_up=False after 1-d), the plugin overwrite its status to 'DOWN' without operations to the backend.

Tags: nec
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/41405

Changed in neutron:
assignee: nobody → Ryota Mibu (r-mibu)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/41405
Committed: http://github.com/openstack/neutron/commit/04f689daa9df689287891d3505b89e3cfed8cd7a
Submitter: Jenkins
Branch: master

commit 04f689daa9df689287891d3505b89e3cfed8cd7a
Author: Ryota MIBU <email address hidden>
Date: Mon Aug 12 14:10:40 2013 +0900

    Fix resource status in NEC Plugin

    This commit makes sure that the plugin exposes right status in a
    response body, and does not overwrite ERROR status until another
    operation to the backend has succeeded.

    This commit also changes NEC Plguin to use neutron constants instead of
    OperationalStatus defined in this plugin.

    Fixes: bug #1211319
    Change-Id: Ic61b8e1b9d3f6c2be9567dd5a4606aa6d439c564

Changed in neutron:
status: In Progress → Fix Committed
Changed in neutron:
milestone: none → havana-3
importance: Undecided → High
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-3 → 2013.2
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.