Skip to content

Commit 1ea71be

Browse files
committed
ceph orch add fails when ipv6 address is surrounded by square brackets.
fixes: https://tracker.ceph.com/issues/61885 fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2153448 Signed-off-by: Teoman ONAY <[email protected]>
1 parent 9051031 commit 1ea71be

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
@@ -466,6 +467,9 @@ def _add_host(self,
466467
if labels and len(labels) == 1:
467468
labels = labels[0].split(',')
468469

470+
if addr is not None:
471+
addr = unwrap_ipv6(addr)
472+
469473
s = HostSpec(hostname=hostname, addr=addr, labels=labels, status=_status)
470474

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

0 commit comments

Comments
 (0)