]> 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>
Wed, 19 Nov 2025 18:41:52 +0000 (20:41 +0200)
- Partial revert of https://github.com/ceph/ceph/pull/59738/commits/9eb3b99b99b0b8c6c4e5f75e59c2e4835a9d6796
- Part of https://github.com/ceph/ceph/pull/59738

(cherry picked from commit 62a4247353dd85417303995cda7e9b8ffae1e929)

python-common/ceph/deployment/service_spec.py: Allow the cephadm deployment to determine the default addresses

Signed-off-by: Alexander Indenbaum <aindenba@redhat.com>
(cherry picked from commit 0997e4cd51edfe954148bfb8b7f42be9205c237c)

Resolves: rhbz#2311996
(cherry picked from commit 2db75595f1c44f5fb973a612a08406b5630ad1e5)

src/pybind/mgr/cephadm/services/nvmeof.py
src/python-common/ceph/deployment/service_spec.py

index 1f0c6cbfaf71fa2d7a5b8edad6e9cec1bf3c5fa3..7ca3f9d42ce9ef9c8719e73101dcf9c925e5f64d 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,
index 18a27eab664bb4a1d3fcc35ff5b52d22c7a64f0d..9d2fd64d7d101d99ead734233a40d97b2d12386c 100644 (file)
@@ -1380,7 +1380,7 @@ class NvmeofServiceSpec(ServiceSpec):
         #: RADOS pool where ceph-nvmeof config data is stored.
         self.pool = pool
         #: ``addr`` address of the nvmeof gateway
-        self.addr = addr or "0.0.0.0"
+        self.addr = addr
         #: ``port`` port of the nvmeof gateway
         self.port = port or 5500
         #: ``name`` name of the nvmeof gateway