Initialize service var before the metadata discovery
The service variable needs to be initialized before the metadata discovery check, as a plugin might request a reboot after the pre-metadata stage and the service variable will remain uninitialized. Closes-bug: #1666258 Change-Id: I4028b76f787267476b5320e5a480f54b58c59293
This commit is contained in:
parent
ec8a8cd0d6
commit
c26ea83ad6
@ -159,6 +159,7 @@ class InitManager(object):
|
||||
sys.exit(exit_code)
|
||||
|
||||
def configure_host(self):
|
||||
service = None
|
||||
osutils = osutils_factory.get_os_utils()
|
||||
|
||||
if CONF.reset_service_password and sys.platform == 'win32':
|
||||
@ -183,7 +184,6 @@ class InitManager(object):
|
||||
service = metadata_factory.get_metadata_service()
|
||||
except exception.MetadaNotFoundException:
|
||||
LOG.error("No metadata service found")
|
||||
service = None
|
||||
if service:
|
||||
LOG.info('Metadata service loaded: \'%s\'' %
|
||||
service.get_name())
|
||||
|
Loading…
x
Reference in New Issue
Block a user