Restarting nova-compute with source groups lead to traceback.

Bug #1122316 reported by Vish Ishaya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Vish Ishaya

Bug Description

Repro:

 nova secgroup-create groupa
 nova secgroup-create groupa groupa
 nova secgroup-create groupb
 nova secgroup-create groupb groupb
 nova boot --flavor 1 --key-name mykey --image <image> --security-group=groupa a
 nova boot --flavor 1 --key-name mykey --image <image> --security-group=groupb b
 nova secgroup-add-group-rule groupb groupa icmp -1 -1
 nova secgroup-add-group-rule groupa groupb icmp -1 -1

restart nova-compute

2013-02-11 10:59:20.263 CRITICAL nova [-] string indices must be integers
2013-02-11 10:59:20.263 TRACE nova Traceback (most recent call last):
2013-02-11 10:59:20.263 TRACE nova File "/opt/stack/nova/bin/nova-compute", line 84, in <module>
2013-02-11 10:59:20.263 TRACE nova service.wait()
2013-02-11 10:59:20.263 TRACE nova File "/opt/stack/nova/nova/service.py", line 689, in wait
2013-02-11 10:59:20.263 TRACE nova _launcher.wait()
2013-02-11 10:59:20.263 TRACE nova File "/opt/stack/nova/nova/service.py", line 209, in wait
2013-02-11 10:59:20.263 TRACE nova super(ServiceLauncher, self).wait()
2013-02-11 10:59:20.263 TRACE nova File "/opt/stack/nova/nova/service.py", line 179, in wait
2013-02-11 10:59:20.263 TRACE nova service.wait()
2013-02-11 10:59:20.263 TRACE nova File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 166, in wait
2013-02-11 10:59:20.263 TRACE nova return self._exit_event.wait()
2013-02-11 10:59:20.263 TRACE nova File "/usr/local/lib/python2.7/dist-packages/eventlet/event.py", line 116, in wait
2013-02-11 10:59:20.263 TRACE nova return hubs.get_hub().switch()
2013-02-11 10:59:20.263 TRACE nova File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 177, in switch
2013-02-11 10:59:20.263 TRACE nova return self.greenlet.switch()
2013-02-11 10:59:20.263 TRACE nova File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line 192, in main
2013-02-11 10:59:20.263 TRACE nova result = function(*args, **kwargs)
2013-02-11 10:59:20.263 TRACE nova File "/opt/stack/nova/nova/service.py", line 147, in run_server
2013-02-11 10:59:20.263 TRACE nova server.start()
2013-02-11 10:59:20.263 TRACE nova File "/opt/stack/nova/nova/service.py", line 429, in start
2013-02-11 10:59:20.263 TRACE nova self.manager.init_host()
2013-02-11 10:59:20.263 TRACE nova File "/opt/stack/nova/nova/compute/manager.py", line 516, in init_host
2013-02-11 10:59:20.263 TRACE nova self._init_instance(context, instance)
2013-02-11 10:59:20.263 TRACE nova File "/opt/stack/nova/nova/compute/manager.py", line 497, in _init_instance
2013-02-11 10:59:20.263 TRACE nova self._legacy_nw_info(net_info))
2013-02-11 10:59:20.263 TRACE nova File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 2667, in ensure_filtering_rules_for_instance
2013-02-11 10:59:20.263 TRACE nova network_info)
2013-02-11 10:59:20.263 TRACE nova File "/opt/stack/nova/nova/virt/firewall.py", line 188, in prepare_instance_filter
2013-02-11 10:59:20.263 TRACE nova ipv4_rules, ipv6_rules = self.instance_rules(instance, network_info)
2013-02-11 10:59:20.263 TRACE nova File "/opt/stack/nova/nova/virt/firewall.py", line 403, in instance_rules
2013-02-11 10:59:20.263 TRACE nova instance)
2013-02-11 10:59:20.263 TRACE nova File "/opt/stack/nova/nova/network/api.py", line 88, in wrapped
2013-02-11 10:59:20.263 TRACE nova return func(self, context, *args, **kwargs)
2013-02-11 10:59:20.263 TRACE nova File "/opt/stack/nova/nova/network/api.py", line 338, in get_instance_nw_info
2013-02-11 10:59:20.263 TRACE nova result = self._get_instance_nw_info(context, instance)
2013-02-11 10:59:20.263 TRACE nova File "/opt/stack/nova/nova/network/api.py", line 347, in _get_instance_nw_info
2013-02-11 10:59:20.263 TRACE nova 'rxtx_factor': instance['instance_type']['rxtx_factor'],
2013-02-11 10:59:20.263 TRACE nova TypeError: string indices must be integers
2013-02-11 10:59:20.263 TRACE nova

Changed in nova:
importance: Undecided → High
description: updated
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/21679

Changed in nova:
assignee: nobody → Vish Ishaya (vishvananda)
status: New → In Progress
Revision history for this message
Andrew Laski (alaski) wrote :

I'm not sure how to open issues with devstack/tempest but tests against restarting services under different scenarios may be helpful to shake out any other issues like this one.

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

Reviewed: https://review.openstack.org/21679
Committed: http://github.com/openstack/nova/commit/1564bbce9816eaeeffb6007564cf5b1aaa7561a1
Submitter: Jenkins
Branch: master

commit 1564bbce9816eaeeffb6007564cf5b1aaa7561a1
Author: Vishvananda Ishaya <email address hidden>
Date: Mon Feb 11 09:00:16 2013 -0800

    Fix handling of source_groups with no-db-compute.

    The moving of data around in no-db-compute broke source groups. This
    is a combination of a few errors. First, the instance_type data wasn't
    being retrieved from system_metadata. Second, the instance_type data
    was too deep in the heirarchy and being ignored. Finally, source
    groups require a nw info call which causes a db access by
    nova-compute.

    Fixes bug 1122316

    Change-Id: Iccb6e5d336c0b2c8ba41c41ab2e046fc9617835a

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