From 1564bbce9816eaeeffb6007564cf5b1aaa7561a1 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Mon, 11 Feb 2013 09:00:16 -0800 Subject: 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 --- nova/virt/firewall.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'nova/virt') diff --git a/nova/virt/firewall.py b/nova/virt/firewall.py index 6ab4249b1..a36beb7f0 100644 --- a/nova/virt/firewall.py +++ b/nova/virt/firewall.py @@ -19,6 +19,7 @@ from oslo.config import cfg +from nova import conductor from nova import context from nova import network from nova.network import linux_net @@ -398,9 +399,11 @@ class IptablesFirewallDriver(FirewallDriver): # and should be the only one making # making rpc calls. nw_api = network.API() + capi = conductor.API() for instance in rule['grantee_group']['instances']: nw_info = nw_api.get_instance_nw_info(ctxt, - instance) + instance, + capi) ips = [ip['address'] for ip in nw_info.fixed_ips() -- cgit