From 9ec3d203197e9da472718aa5671007269ef5fae0 Mon Sep 17 00:00:00 2001 From: Adam King Date: Fri, 29 Jul 2022 17:26:58 -0400 Subject: [PATCH] cephadm: support quotes around public/cluster network in config passed to bootstrap Fixes: https://tracker.ceph.com/issues/56973 Signed-off-by: Adam King --- src/cephadm/cephadm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index ba342991e1b..5b53464561f 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -4885,7 +4885,7 @@ def get_public_net_from_cfg(ctx: CephadmContext) -> Optional[str]: return None # Ensure all public CIDR networks are valid - public_network = cp.get('global', 'public_network') + public_network = cp.get('global', 'public_network').strip('"').strip("'") rc, _, err_msg = check_subnet(public_network) if rc: raise Error(f'Invalid public_network {public_network} parameter: {err_msg}') @@ -4982,7 +4982,7 @@ def prepare_cluster_network(ctx: CephadmContext) -> Tuple[str, bool]: cp = read_config(ctx.config) cluster_network = ctx.cluster_network if cluster_network is None and cp.has_option('global', 'cluster_network'): - cluster_network = cp.get('global', 'cluster_network') + cluster_network = cp.get('global', 'cluster_network').strip('"').strip("'") if cluster_network: cluser_nets = set([x.strip() for x in cluster_network.split(',')])