How to know which security group started the server instance

Asked by Ravikumar Venkatesan

1) I created security group (OS API extension for security group)
    nova secgroup-create ravi_sec test_sec
2) start nova instance with security group
    nova boot ravitest1 --flavor 101 -- image 227 --security_groups ravi_sec
3) Run nova list
   nova list - does not show the security group with which it is created.

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Ravikumar Venkatesan
Solved:
Last query:
Last reply:
Revision history for this message
Jeff Kramer (jeffkramer) said :
#1

It appears that this feature is part of diablo final, see _server_to_xml_detailed in nova/api/openstack/servers.py around line 931:

https://github.com/openstack/nova/blob/stable/diablo/nova/api/openstack/servers.py

        if 'security_groups' in server:
            security_groups_node = self._create_security_groups_node(xml_doc,
                                                    server['security_groups'])
            server_node.appendChild(security_groups_node)

For some reason it doesn't seem to work, though. When I call the API I get image, flavor and addresses, but no security groups. They do show up when you call the EC2 api for details on the same server.

Revision history for this message
Vish Ishaya (vishvananda) said :
#2

This sounds like a bug. Does it happen with trunk as well?

Revision history for this message
Ravikumar Venkatesan (ravikumar-venkatesan) said :
#3

yes . It is in trunk.
1) euca-describe-instances return security group , but NOT nova list . I am logging bug