Security group in /nova/network/quantumv2/api.py

Asked by Klaudia

Hi,
I installed grizzly . I wanna to launch instance, but i get problem , in nova/nova-scheduler.log I get this log:

2013-05-28 14:53:23.716 ERROR nova.scheduler.filter_scheduler [req-ec80ec3e-948c-4c29-bd20-3d38fe506a2e f6e3916e12ab40efb5562c260f737168 e9ee41924fd44b34aba820d9e7e7ebf5] [instance: 17927393-5a46-4657-a1f0-b67631343994] Error from last host: c01 (node c01): [u'Traceback (most recent call last):\n', u' File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 817, in _run_instance\n requested_networks, macs, security_groups)\n', u' File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1061, in _allocate_network\n instance=instance)\n', u' File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__\n self.gen.next()\n', u' File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1057, in _allocate_network\n security_groups=security_groups)\n', u' File "/usr/lib/python2.7/dist-packages/nova/network/api.py", line 46, in wrapper\n res = f(self, context, *args, **kwargs)\n', u' File "/usr/lib/python2.7/dist-packages/nova/network/quantumv2/api.py", line 232, in allocate_for_instance\n raise exception.SecurityGroupCannotBeApplied()\n', u'SecurityGroupCannotBeApplied: Network requires port_security_enabled and subnet associated in order to apply security groups.\n']
2013-05-28 14:53:23.729 WARNING nova.scheduler.driver [req-ec80ec3e-948c-4c29-bd20-3d38fe506a2e f6e3916e12ab40efb5562c260f737168 e9ee41924fd44b34aba820d9e7e7ebf5] [instance: 17927393-5a46-4657-a1f0-b67631343994] Setting instance to ERROR state.

I know the codee of security groups and verification is there:

https://github.com/openstack/nova/blob/master/nova/network/quantumv2/api.py

How i done security groups? I just added then on controlleer node (with cmd) using this command:

# Define security rules

nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
nova secgroup-add-rule default tcp 80 80 0.0.0.0/0

Why my instance dont wanna launch?? any suggestion?

Question information

Language:
English Edit question
Status:
Solved
For:
neutron Edit question
Assignee:
No assignee Edit question
Solved by:
Klaudia
Solved:
Last query:
Last reply:
Revision history for this message
Klaudia (graklaudia) said :
#1

Ok. I manage to solve this. thanks :)

Revision history for this message
Ashok kumaran B (ashokkumaran-b) said :
#2

Klaudia,

Can you tell me what was the correction done?

Thanks
Ashok

Revision history for this message
Christopher Dearborn (cdearbor) said :
#3

I just ran into this problem, and thought I would post what I found. In my case, the issue turned out to be sleep deprivation and a lack of caffeine!

If you create a network via Admin->Networks->Create Network in Horizon, it creates a network, but not an associated subnet. This should be obvious, since it doesn't query you for the subnet information. If you then try to deploy a VM instance attaching it to this network, then the VM instance will go into the "Scheduling" state and hang there. The above error can then be found in /var/log/nova/nova-scheduler.log.

You can tell if a subnet is associated with a network by going to Admin->Networks and looking in the "Subnets Associated" column.

All that said, it would be less confusing if the Create Network button resulted in the same dialog that Project->Networks->Create Network button brings up.

Revision history for this message
sngirame (sngirame) said :
#4

I am too facing the same problem while launching the instance on a 3 machine setup (controller+network+compute) on ubuntu 12.04 grizzly release.
How should I fix this?