diff options
| author | Morgan Fainberg <m@metacloud.com> | 2012-11-27 13:00:48 -0800 |
|---|---|---|
| committer | Morgan Fainberg <m@metacloud.com> | 2012-11-28 15:51:03 -0800 |
| commit | 77e38b7cfc2206ef4ac528d3c9faaa09adbf7f58 (patch) | |
| tree | 89b41519f1f0c629387d6052ca4e2382c40d675a | |
| parent | 79d64e60552d5075e4347218c851f26dcd6ecc53 (diff) | |
| download | nova-77e38b7cfc2206ef4ac528d3c9faaa09adbf7f58.tar.gz nova-77e38b7cfc2206ef4ac528d3c9faaa09adbf7f58.tar.xz nova-77e38b7cfc2206ef4ac528d3c9faaa09adbf7f58.zip | |
Call plug_vifs() for all instances in init_host
Remove the assumption that we are using the "flat" networking model
and there is a single bridge interface for all instances on a given
compute node. Instead simply call plug_vifs() for each instance in
init_host.
Fixes bug 1083784
Change-Id: I4b367deb6851c06c80a4bdf0bd806cf5e867bb0a
| -rw-r--r-- | nova/compute/manager.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py index a0835d107..2ab73ad6e 100644 --- a/nova/compute/manager.py +++ b/nova/compute/manager.py @@ -369,7 +369,7 @@ class ComputeManager(manager.SchedulerDependentManager): self.driver.filter_defer_apply_on() try: - for count, instance in enumerate(instances): + for instance in instances: db_state = instance['power_state'] drv_state = self._get_power_state(context, instance) closing_vm_states = (vm_states.DELETED, @@ -389,10 +389,9 @@ class ComputeManager(manager.SchedulerDependentManager): net_info = compute_utils.get_nw_info_for_instance(instance) # We're calling plug_vifs to ensure bridge and iptables - # filters are present, calling it once is enough. - if count == 0: - legacy_net_info = self._legacy_nw_info(net_info) - self.driver.plug_vifs(instance, legacy_net_info) + # rules exist. This needs to be called for each instance. + legacy_net_info = self._legacy_nw_info(net_info) + self.driver.plug_vifs(instance, legacy_net_info) if ((expect_running and CONF.resume_guests_state_on_host_boot) or CONF.start_guests_on_host_boot): |
