Skip to content
Snippets Groups Projects
Commit dd13f70b authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Device component:

- Moved pre-load of drivers after start of gRPC server. Otherwise, K8s kills the component when retrieval of devices takes long time.
parent 69a6a4af
No related branches found
No related tags found
3 merge requests!142Release TeraFlowSDN 2.1,!132NetSoft Hackfest extensions, gNMI Driver, gNMI L3NM Service Handler, multiple fixes,!113Draft: NetSoft Hackfest extensions
...@@ -58,13 +58,14 @@ def main(): ...@@ -58,13 +58,14 @@ def main():
driver_factory = DriverFactory(DRIVERS) driver_factory = DriverFactory(DRIVERS)
driver_instance_cache = DriverInstanceCache(driver_factory) driver_instance_cache = DriverInstanceCache(driver_factory)
# Initialize drivers with existing devices in context
preload_drivers(driver_instance_cache)
# Starting device service # Starting device service
grpc_service = DeviceService(driver_instance_cache) grpc_service = DeviceService(driver_instance_cache)
grpc_service.start() grpc_service.start()
# Initialize drivers with existing devices in context
LOGGER.info('Pre-loading drivers...')
preload_drivers(driver_instance_cache)
# Wait for Ctrl+C or termination signal # Wait for Ctrl+C or termination signal
while not terminate.wait(timeout=1.0): pass while not terminate.wait(timeout=1.0): pass
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment