From: Redouane Kachach Date: Fri, 11 Mar 2022 11:41:18 +0000 (+0100) Subject: mgr/cephadm: Show warning when user provides --fsid option X-Git-Tag: v18.0.0~1158^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=8780aa04651fa2cddeec1d9d2dfcf4e08412d4ce;p=ceph.git mgr/cephadm: Show warning when user provides --fsid option Fixes: https://tracker.ceph.com/issues/50804 Signed-off-by: Redouane Kachach --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 51b1f986bec05..97ba747a0541c 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -5015,6 +5015,13 @@ def command_bootstrap(ctx): if not ctx.output_pub_ssh_key: ctx.output_pub_ssh_key = os.path.join(ctx.output_dir, 'ceph.pub') + if ctx.fsid: + data_dir_base = os.path.join(ctx.data_dir, ctx.fsid) + if os.path.exists(data_dir_base): + raise Error(f"A cluster with the same fsid '{ctx.fsid}' already exists.") + else: + logger.warning('Specifying an fsid for your cluster offers no advantages and may increase the likelihood of fsid conflicts.') + # verify output files for f in [ctx.output_config, ctx.output_keyring, ctx.output_pub_ssh_key]: