mirror of
https://github.com/ceph/ceph
synced 2025-02-24 19:47:44 +00:00
cephadm: fix regexp to strip v1:
or v2:
prefix from IPv6 addr
regexp was striping the first hextet of the IPv6 address: ``` FAILED tests/test_cephadm.py::TestBootstrap::test_mon_addrv[[0000:0000:0000:0000:0000:FFFF:C0A8:0101:1234]-list_networks5-None] - cephadm.Error: Cannot infer CIDR network for mon IP `0000:0000:0000:0000:FFFF:C0A8:0101`: pass --skip-mon-network to configure it later ``` Signed-off-by: Michael Fritch <mfritch@suse.com>
This commit is contained in:
parent
e40b78d432
commit
85dfc6f4a9
@ -3492,7 +3492,7 @@ def prepare_mon_addresses(
|
||||
addr_arg)
|
||||
port = int(hasport[0])
|
||||
# strip off v1: or v2: prefix
|
||||
addr = re.sub(r'^\w+:', '', addr)
|
||||
addr = re.sub(r'^v\d+:', '', addr)
|
||||
base_ip = addr[0:-(len(str(port))) - 1]
|
||||
check_ip_port(ctx, base_ip, port)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user