Fixes bug in waiting for sysprep completion

wait_for_boot_completion() needs to be called before get_metadata_service()
as the metadata service constructor can fail due to Windows APIs not yet
available.
This commit is contained in:
Alessandro Pilotti 2013-08-13 00:34:30 +03:00
parent 4bd0489427
commit fcdf299aff

View File

@ -54,14 +54,14 @@ class InitManager(object):
LOG.exception(ex)
def configure_host(self):
osutils = osutils_factory.OSUtilsFactory().get_os_utils()
osutils.wait_for_boot_completion()
mdsf = metadata_factory.MetadataServiceFactory()
service = mdsf.get_metadata_service()
LOG.info('Metadata service loaded: \'%s\'' %
service.__class__.__name__)
osutils = osutils_factory.OSUtilsFactory().get_os_utils()
osutils.wait_for_boot_completion()
plugins = plugins_factory.PluginFactory().load_plugins()
reboot_required = False