Merge "Support passing arbitrary cephadm arguments at bootstrap"

This commit is contained in:
Zuul 2022-03-15 21:45:40 +00:00 committed by Gerrit Code Review
commit dad628fb97

View File

@ -174,6 +174,17 @@ class OvercloudCephDeploy(command.Command):
"Path to an existing ceph.conf with settings "
"to be assimilated by the new cluster via "
"'cephadm bootstrap --config' ")),
parser.add_argument('--cephadm-extra-args',
help=_(
"String of extra parameters to pass cephadm. "
"E.g. if --cephadm-extra-args '--log-to-file "
" --skip-prepare-host', then cephadm boostrap "
"will use those options. Warning: requires "
"--force as not all possible options ensure a "
"functional deployment.")),
parser.add_argument('--force', default=False,
action='store_true',
help=_("Run command regardless of consequences."))
parser.add_argument('--ceph-vip',
help=_(
"Path to an existing Ceph services/network "
@ -408,6 +419,12 @@ class OvercloudCephDeploy(command.Command):
else:
extra_vars['tripleo_cephadm_ha_services_path'] = \
os.path.abspath(parsed_args.ceph_vip)
if parsed_args.cephadm_extra_args and not parsed_args.force:
raise oscexc.CommandError(
"--cephadm-extra-args requires --force.")
if parsed_args.cephadm_extra_args and parsed_args.force:
extra_vars['tripleo_cephadm_extra_args'] = \
parsed_args.cephadm_extra_args
if parsed_args.daemons:
if not os.path.exists(parsed_args.daemons):
raise oscexc.CommandError(