Skip to content

Commit 6c4ed58

Browse files
authored
Merge pull request ceph#52296 from asm0deuz/bz2153448_ipv6
mgr/cephadm: ceph orch add fails when ipv6 address is surrounded by square brackets. Reviewed-by: Adam King <[email protected]>
2 parents ab07057 + 1ea71be commit 6c4ed58

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pybind/mgr/orchestrator/module.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from ceph.deployment.drive_group import DriveGroupSpec, DeviceSelection, OSDMethod
2020
from ceph.deployment.service_spec import PlacementSpec, ServiceSpec, service_spec_allow_invalid_from_json, TracingSpec
2121
from ceph.deployment.hostspec import SpecValidationError
22+
from ceph.deployment.utils import unwrap_ipv6
2223
from ceph.utils import datetime_now
2324

2425
from mgr_util import to_pretty_timedelta, format_bytes
@@ -479,6 +480,9 @@ def _add_host(self,
479480
if labels and len(labels) == 1:
480481
labels = labels[0].split(',')
481482

483+
if addr is not None:
484+
addr = unwrap_ipv6(addr)
485+
482486
s = HostSpec(hostname=hostname, addr=addr, labels=labels, status=_status)
483487

484488
return self._apply_misc([s], False, Format.plain)

0 commit comments

Comments
 (0)