Merge PR #33443 into master

* refs/pull/33443/head:
	cephadm: prepare-host: do not create Packager unless we need it

Reviewed-by: Sebastian Wagner <swagner@suse.com>
This commit is contained in:
Sage Weil 2020-02-20 21:40:34 -06:00
commit 3e5c1f8465

View File

@ -2630,17 +2630,23 @@ def command_check_host():
##################################
def command_prepare_host():
pkg = create_packager()
logger.info('Verifying podman|docker is present...')
pkg = None
if not container_path:
if not pkg:
pkg = create_packager()
pkg.install_podman()
logger.info('Verifying lvm2 is present...')
if not find_executable('lvcreate'):
if not pkg:
pkg = create_packager()
pkg.install(['lvm2'])
logger.info('Verifying time synchronization is in place...')
if not check_time_sync():
if not pkg:
pkg = create_packager()
pkg.install(['chrony'])
if 'expect_hostname' in args and args.expect_hostname and args.expect_hostname != get_hostname():