From: Alexander Indenbaum Date: Thu, 12 Sep 2024 09:26:34 +0000 (+0000) Subject: pybind/mgr/cephadm/services/nvmeof.py: allow setting '0.0.0.0' as address in the... X-Git-Tag: testing/wip-vshankar-testing-20240917.043942-debug~18^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=62a4247353dd85417303995cda7e9b8ffae1e929;p=ceph-ci.git pybind/mgr/cephadm/services/nvmeof.py: allow setting '0.0.0.0' as address in the spec file - Partial revert of https://github.com/ceph/ceph/pull/59738/commits/9eb3b99b99b0b8c6c4e5f75e59c2e4835a9d6796 - Part of https://github.com/ceph/ceph/pull/59738 Signed-off-by: Alexander Indenbaum --- diff --git a/src/pybind/mgr/cephadm/services/nvmeof.py b/src/pybind/mgr/cephadm/services/nvmeof.py index 1792bbf37c9..8b15aace373 100644 --- a/src/pybind/mgr/cephadm/services/nvmeof.py +++ b/src/pybind/mgr/cephadm/services/nvmeof.py @@ -47,12 +47,8 @@ class NvmeofService(CephService): transport_tcp_options = json.dumps(spec.transport_tcp_options) if spec.transport_tcp_options else None name = '{}.{}'.format(utils.name_to_config_section('nvmeof'), nvmeof_gw_id) rados_id = name[len('client.'):] if name.startswith('client.') else name - addr = host_ip - discovery_addr = host_ip - if spec.addr and spec.addr != "0.0.0.0": - addr = spec.addr - if spec.discovery_addr and spec.discovery_addr != "0.0.0.0": - discovery_addr = spec.discovery_addr + addr = spec.addr or host_ip + discovery_addr = spec.discovery_addr or host_ip context = { 'spec': spec, 'name': name,