Error on adding duplicated secgroup

Bug #1691274 reported by hongbin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
hongbin
Ocata
Fix Committed
Undecided
hongbin
Pike
Fix Committed
Undecided
hongbin

Bug Description

Steps to reproduce:

openstack server create --flavor m1.tiny --security-group default --image cirros-0.3.5-x86_64-disk myinstance
$ openstack server add security group myinstance default
Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'neutronclient.common.exceptions.BadRequest'> (HTTP 500) (Request-ID: req-b5f07687-7b4d-4ff3-90b4-0835dbeef9c4)

The error in n-api: http://paste.openstack.org/show/609722/

hongbin (hongbin034)
Changed in nova:
assignee: nobody → hongbin (hongbin034)
Changed in nova:
status: New → In Progress
Matt Riedemann (mriedem)
Changed in nova:
importance: Undecided → Medium
Revision history for this message
Sean Dague (sdague) wrote :

There are no currently open reviews on this bug, changing
the status back to the previous state and unassigning. If
there are active reviews related to this bug, please include
links in comments.

Changed in nova:
status: In Progress → New
assignee: hongbin (hongbin034) → nobody
Revision history for this message
hongbin (hongbin034) wrote :
Changed in nova:
assignee: nobody → hongbin (hongbin034)
Sean Dague (sdague)
Changed in nova:
assignee: hongbin (hongbin034) → nobody
Sean Dague (sdague)
Changed in nova:
assignee: nobody → hongbin (hongbin034)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/465173
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=083bc89f99e007c400b9f89c63ac0459da910df8
Submitter: Zuul
Branch: master

commit 083bc89f99e007c400b9f89c63ac0459da910df8
Author: Hongbin Lu <email address hidden>
Date: Tue May 16 20:54:25 2017 +0000

    Handle exception on adding secgroup

    If user adds security group to an instance and the instance already
    has that security group, neutron will return a 400 response. Nova
    should handle the 400 response properly. In before, Nova doesn't
    seem to handle this case and end-user gets a 500 response. This
    commit fixed it.

    Closes-Bug: #1691274
    Change-Id: I58b19ef6b537d690df90e542b6af3c64773ecc87

Changed in nova:
status: In Progress → Fix Released
Matt Riedemann (mriedem)
no longer affects: nova/newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/pike)

Fix proposed to branch: stable/pike
Review: https://review.openstack.org/515418

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/515421

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 17.0.0.0b2

This issue was fixed in the openstack/nova 17.0.0.0b2 development milestone.

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

Reviewed: https://review.openstack.org/515418
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=fe9192037c2db49393e2e5f4e1c088ad7c38215f
Submitter: Zuul
Branch: stable/pike

commit fe9192037c2db49393e2e5f4e1c088ad7c38215f
Author: Hongbin Lu <email address hidden>
Date: Tue May 16 20:54:25 2017 +0000

    Handle exception on adding secgroup

    If user adds security group to an instance and the instance already
    has that security group, neutron will return a 400 response. Nova
    should handle the 400 response properly. In before, Nova doesn't
    seem to handle this case and end-user gets a 500 response. This
    commit fixed it.

    Conflicts:
          nova/network/security_group/neutron_driver.py

    NOTE(hongbin): The conflict is due to the removal of translation of
    log messages.

    Closes-Bug: #1691274
    Change-Id: I58b19ef6b537d690df90e542b6af3c64773ecc87
    (cherry picked from commit 083bc89f99e007c400b9f89c63ac0459da910df8)

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

Reviewed: https://review.openstack.org/515421
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=1d614443a7198642ef14467ab470ce1aa41f36b9
Submitter: Zuul
Branch: stable/ocata

commit 1d614443a7198642ef14467ab470ce1aa41f36b9
Author: Hongbin Lu <email address hidden>
Date: Tue May 16 20:54:25 2017 +0000

    Handle exception on adding secgroup

    If user adds security group to an instance and the instance already
    has that security group, neutron will return a 400 response. Nova
    should handle the 400 response properly. In before, Nova doesn't
    seem to handle this case and end-user gets a 500 response. This
    commit fixed it.

    Conflicts:
          nova/network/security_group/neutron_driver.py

    NOTE(hongbin): The conflict is due to the removal of translation of
    log messages.

    Closes-Bug: #1691274
    Change-Id: I58b19ef6b537d690df90e542b6af3c64773ecc87
    (cherry picked from commit 083bc89f99e007c400b9f89c63ac0459da910df8)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 16.1.0

This issue was fixed in the openstack/nova 16.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/nova 15.1.1

This issue was fixed in the openstack/nova 15.1.1 release.

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.