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
This commit is contained in:
Vishvananda Ishaya
2013-02-11 09:00:16 -08:00
parent 032308c792
commit 1564bbce98
4 changed files with 11 additions and 5 deletions

View File

@@ -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()