]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
pybind/mgr/cephadm/services/nvmeof.py: allow setting '0.0.0.0' as address in the...
authorAlexander Indenbaum <aindenba@redhat.com>
Thu, 12 Sep 2024 09:26:34 +0000 (09:26 +0000)
committerAlexander Indenbaum <aindenba@redhat.com>
Thu, 12 Sep 2024 09:26:40 +0000 (09:26 +0000)
- 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 <aindenba@redhat.com>
src/pybind/mgr/cephadm/services/nvmeof.py

index 1792bbf37c9c9dab583f15dcb27aeab84bcdd8e0..8b15aace373c56a84f12b2723caaeb534988bcd5 100644 (file)
@@ -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,