failure to launch instance with self-referential security group

Bug #965591 reported by Kapil Thangavelu
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned
pyjuju
Invalid
Undecided
Unassigned

Bug Description

Given a security group

$ euca-describe-group juju-stack
GROUP kapil_project juju-stack juju group for stack
PERMISSION kapil_project juju-stack ALLOWS tcp 22 22 FROM CIDR 0.0.0.0/0
PERMISSION kapil_project juju-stack ALLOWS icmp -1 -1 GRPNAME juju-stack
PERMISSION kapil_project juju-stack ALLOWS tcp 1 65535 GRPNAME juju-stack
PERMISSION kapil_project juju-stack ALLOWS udp 1 65536 GRPNAME juju-stack

And an attempt to launch an instance with that group

$ euca-run-instances -k kapil -t m1.small -g juju-stack ami-00000078

Will always result in a failure to launch the instance, it transitions from pending to error.

$ euca-describe-instances

RESERVATION r-ssme0x7j kapil_project juju-stack
INSTANCE i-00001ceb ami-00000078 server-7403 server-7403 error kapil 0 m1.small 2012-03-26T18:40:18Z nova monitoring-disabled instance-store

Tags: canonistack
Changed in juju:
milestone: none → florence
Revision history for this message
David Lawson (deej) wrote :
Download full text (5.1 KiB)

These are the tracebacks we're seeing when this bug is invoked.

2012-03-26 19:21:28 ERROR nova.compute.manager [-] [instance: 2967f7b5-ae4a-4511-a8b0-10f330b7d5df] Instance failed to spawn
(nova.compute.manager): TRACE: Traceback (most recent call last):
(nova.compute.manager): TRACE: File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 592, in _spawn
(nova.compute.manager): TRACE: self._legacy_nw_info(network_info), block_device_info)
(nova.compute.manager): TRACE: File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 114, in wrapped
(nova.compute.manager): TRACE: return f(*args, **kw)
(nova.compute.manager): TRACE: File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/connection.py", line 926, in spawn
(nova.compute.manager): TRACE: self.firewall_driver.prepare_instance_filter(instance, network_info)
(nova.compute.manager): TRACE: File "/usr/lib/python2.7/dist-packages/nova/virt/firewall.py", line 136, in prepare_instance_filter
(nova.compute.manager): TRACE: self.add_filters_for_instance(instance)
(nova.compute.manager): TRACE: File "/usr/lib/python2.7/dist-packages/nova/virt/firewall.py", line 178, in add_filters_for_instance
(nova.compute.manager): TRACE: ipv4_rules, ipv6_rules = self.instance_rules(instance, network_info)
(nova.compute.manager): TRACE: File "/usr/lib/python2.7/dist-packages/nova/virt/firewall.py", line 334, in instance_rules
(nova.compute.manager): TRACE: ips.extend(net[1]['ips'])
(nova.compute.manager): TRACE: KeyError: 1
(nova.compute.manager): TRACE:

Then again when trying to deallocate the network for the instance.

2012-03-26 19:21:28 DEBUG nova.compute.manager [-] [instance: 2967f7b5-ae4a-4511-a8b0-10f330b7d5df] Deallocating network for instance from (pid=32203) _deallocate_network /usr/lib/python2.7/dist-packages/nova/compute/manager.py:616
2012-03-26 19:21:28 DEBUG nova.rpc.amqp [-] Making asynchronous cast on network... from (pid=32203) cast /usr/lib/python2.7/dist-packages/nova/rpc/amqp.py:346
2012-03-26 19:21:28 ERROR nova.rpc.amqp [-] Exception during message handling
(nova.rpc.amqp): TRACE: Traceback (most recent call last):
(nova.rpc.amqp): TRACE: File "/usr/lib/python2.7/dist-packages/nova/rpc/amqp.py", line 252, in _process_data
(nova.rpc.amqp): TRACE: rval = node_func(context=ctxt, **node_args)
(nova.rpc.amqp): TRACE: File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 114, in wrapped
(nova.rpc.amqp): TRACE: return f(*args, **kw)
(nova.rpc.amqp): TRACE: File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 177, in decorated_function
(nova.rpc.amqp): TRACE: sys.exc_info())
(nova.rpc.amqp): TRACE: File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
(nova.rpc.amqp): TRACE: self.gen.next()
(nova.rpc.amqp): TRACE: File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 171, in decorated_function
(nova.rpc.amqp): TRACE: return function(self, context, instance_uuid, *args, **kwargs)
(nova.rpc.amqp): TRACE: File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 648, in run_instance
(nova.rpc.amqp): TRACE: self._run_instance(context, instance_u...

Read more...

Revision history for this message
Vish Ishaya (vishvananda) wrote :

I can't replicate this issue with current trunk, but i did find another issue with self-referential groups in the openstack api:

https://bugs.launchpad.net/nova/+bug/965674

Changed in nova:
status: New → Invalid
Changed in juju:
status: New → Invalid
Changed in juju:
milestone: florence → none
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.