]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Dhcp agent sync_state may block or delay
authorStephen Ma <stephen.ma@hp.com>
Thu, 25 Jul 2013 14:25:48 +0000 (07:25 -0700)
committerStephen Ma <stephen.ma@hp.com>
Thu, 25 Jul 2013 16:55:04 +0000 (09:55 -0700)
configuration of new networks.

Fixes Bug 1202722

Change-Id: I368cb064057d48be1491df6825cc67c265706b50

neutron/agent/dhcp_agent.py

index 38582e166acbc95e0de7bb50a54cd6f1e72d9564..08ccbe4b6460aa58bb0a3d503b008062f2b99027 100644 (file)
@@ -156,7 +156,12 @@ class DhcpAgent(manager.Manager):
             active_networks = self.plugin_rpc.get_active_networks_info()
             active_network_ids = set(network.id for network in active_networks)
             for deleted_id in known_network_ids - active_network_ids:
-                self.disable_dhcp_helper(deleted_id)
+                try:
+                    self.disable_dhcp_helper(deleted_id)
+                except Exception:
+                    self.needs_resync = True
+                    LOG.exception(_('Unable to sync network state on deleted '
+                                    'network %s') % deleted_id)
 
             for network in active_networks:
                 pool.spawn_n(self.configure_dhcp_for_network, network)