]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
BigSwitch: Watchdog thread start after servers
authorKevin Benton <blak111@gmail.com>
Mon, 17 Mar 2014 20:39:50 +0000 (13:39 -0700)
committerKevin Benton <blak111@gmail.com>
Mon, 17 Mar 2014 20:41:03 +0000 (13:41 -0700)
Start the watchdog thread after the servers have
been initialized.

Closes-Bug: #1293799
Change-Id: Ic7ae1f55bd7faed6edde84d9d0b52fc8fe7a1fc1

neutron/plugins/bigswitch/servermanager.py

index 5efafed7e5f4f208269d286d59b57b6100b91d0d..1afa0eb9d3358af5abda09fcb84f86d8b8884ded 100644 (file)
@@ -245,8 +245,6 @@ class ServerPool(object):
         # Hash to send to backend with request as expected previous
         # state to verify consistency.
         self.consistency_hash = cdb.get_consistency_hash()
-        eventlet.spawn(self._consistency_watchdog,
-                       cfg.CONF.RESTPROXY.consistency_interval)
 
         if not servers:
             raise cfg.Error(_('Servers not defined. Aborting server manager.'))
@@ -262,6 +260,8 @@ class ServerPool(object):
             self.server_proxy_for(server, int(port))
             for server, port in (s.rsplit(':', 1) for s in servers)
         ]
+        eventlet.spawn(self._consistency_watchdog,
+                       cfg.CONF.RESTPROXY.consistency_interval)
         LOG.debug(_("ServerPool: initialization done"))
 
     def get_capabilities(self):