]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: support quotes around public/cluster network in config passed to bootstrap
authorAdam King <adking@redhat.com>
Fri, 29 Jul 2022 21:26:58 +0000 (17:26 -0400)
committerAdam King <adking@redhat.com>
Wed, 17 Aug 2022 17:50:43 +0000 (13:50 -0400)
Fixes: https://tracker.ceph.com/issues/56973
Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit 9ec3d203197e9da472718aa5671007269ef5fae0)

src/cephadm/cephadm

index 3d540f4edd35cf9e5f555a16a5bec0f9b07b6a2f..4120285ff3669a65bf136a3cc3d34d559ff8175d 100755 (executable)
@@ -4782,7 +4782,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}')
@@ -4879,7 +4879,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(',')])