From: Doug Wiegley Date: Mon, 17 Aug 2015 15:17:46 +0000 (-0600) Subject: Don't fatal error during initialization for missing service providers X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=805496dd5ce85c9280342f1702b12dd30b201bbb;p=openstack-build%2Fneutron-build.git Don't fatal error during initialization for missing service providers Sometime during the split, code was added to fixup driver paths, which imports service providers even for plugins which are not in use. That, combined with neutron including default service providers for VPN and LOADBALANCER, resulted in a really messy mess in terms of removing VPN from the main neutron test suites. This change stops the imports, so that if one of the services is missing, neutron server can still start. It likely breaks the driver path fixup, which can be fixed outside of this gate blockage. Closes-Bug: #1483266 Change-Id: I23f9007357d8cbbae599997c244561a4e2f32ce1 --- diff --git a/neutron/services/provider_configuration.py b/neutron/services/provider_configuration.py index cc406e741..938644f8c 100644 --- a/neutron/services/provider_configuration.py +++ b/neutron/services/provider_configuration.py @@ -51,6 +51,8 @@ def get_provider_driver_class(driver, namespace=SERVICE_PROVIDERS): try: driver_manager = stevedore.driver.DriverManager( namespace, driver).driver + except ImportError: + return driver except RuntimeError: return driver new_driver = "%s.%s" % (driver_manager.__module__,