]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: do not cast subnet to unicode 39350/head
authorKefu Chai <kchai@redhat.com>
Mon, 8 Feb 2021 08:27:44 +0000 (16:27 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 8 Feb 2021 08:29:55 +0000 (16:29 +0800)
this change addresses a regression introduced by
fe4f4402fbcd87667613640f2808d5d0e07e749d, which was tested before
abd9287db0e4f4f7873864119f5ce62519af1d48 got merged. and the former was
merged after abd9287db0e4f4f7873864119f5ce62519af1d48. hence the
regression.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/cephadm/cephadm

index 8d3ff661ac187cc9ba3bb0180142be4a6beaf8d5..75675c9a9e85b5b06c29eb45f95ba50ae667ee01 100755 (executable)
@@ -3150,7 +3150,7 @@ def check_subnet(subnets:str) -> Tuple[int, List[int], str]:
             errors.append(f"{subnet} is not in CIDR format (address/netmask)")
             continue
         try:
-            v = ipaddress.ip_network(unicode(subnet)).version
+            v = ipaddress.ip_network(subnet).version
             versions.add(v)
         except ValueError as e:
             rc = 1