/servers/<instance-id>/os-security-groups returns an empty list when quantum secgroup proxy is enabled

Bug #1159793 reported by Akihiro Motoki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Aaron Rosen

Bug Description

When I enabled Quantum security group proxy in nova (security_group_api = quantum),

GET /servers/<instance-id>/os-security-groups
returns an empty list of security_groups even when the instance is associated with a security group.

This method is used in Horizon to display security group list of an instance.
-----
>>> from novaclient.v1_1 import client
>>> nc = client.Client('demo', 'nomoresecrete', 'demo', 'http://127.0.0.1:5000/v2.0')
>>> s = nc.servers.list
>>> s = nc.servers.list()[0]
>>> s.security_groups
[{u'name': u'default'}]
>>> nc.client.get('/servers/%s/os-security-groups' % nc.servers.list()[0].id)
(<Response [200]>, {u'security_groups': []})
-----

Note that I have not tested with Nova without Quantum.

Aaron Rosen (arosen)
Changed in nova:
status: New → Confirmed
Aaron Rosen (arosen)
Changed in nova:
assignee: nobody → Aaron Rosen (arosen)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: Confirmed → In Progress
Changed in nova:
importance: Undecided → High
Revision history for this message
Aaron Rosen (arosen) wrote :

IMO this should be backported to proposed-master as well once it merges.

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

Reviewed: https://review.openstack.org/25340
Committed: http://github.com/openstack/nova/commit/3492a7bfc54cb9d581d8a119a08448c01039e80c
Submitter: Jenkins
Branch: master

commit 3492a7bfc54cb9d581d8a119a08448c01039e80c
Author: Aaron Rosen <email address hidden>
Date: Mon Mar 25 10:17:17 2013 -0700

    Fix /servers/<instance-id>os-security-groups using quantum

    When using quantum security groups:
     GET /servers/<instance-id>/os-security-groups
    aways returns an empty list. This patch adds a call to
    get_instance_security_groups in the api implemenation of security groups.
    This method passes both the instance_id and instance_uuid so the api layer
    does not need to be aware of which underlying implementation is being used.
    The instance_id is needed when using nova and when using quantum the
    instance_uuid is needed so both need to be passed.

    Fixes bug 1159793

    Change-Id: I372adcf93c55d4e6469ef08429ec260d3387f9fe

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → grizzly-rc2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/25468

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (milestone-proposed)

Reviewed: https://review.openstack.org/25468
Committed: http://github.com/openstack/nova/commit/34126d3ff335e3869317599f7cba691948db7a77
Submitter: Jenkins
Branch: milestone-proposed

commit 34126d3ff335e3869317599f7cba691948db7a77
Author: Aaron Rosen <email address hidden>
Date: Mon Mar 25 10:17:17 2013 -0700

    Fix /servers/<instance-id>os-security-groups using quantum

    When using quantum security groups:
     GET /servers/<instance-id>/os-security-groups
    aways returns an empty list. This patch adds a call to
    get_instance_security_groups in the api implemenation of security groups.
    This method passes both the instance_id and instance_uuid so the api layer
    does not need to be aware of which underlying implementation is being used.
    The instance_id is needed when using nova and when using quantum the
    instance_uuid is needed so both need to be passed.

    Fixes bug 1159793

    Change-Id: I372adcf93c55d4e6469ef08429ec260d3387f9fe

Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-rc2 → 2013.1
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.