This is the IP the nvmeof daemon will bind
to, so it should be the IP of the host we're
deploying the nvmeof daemon on, not the IP
of the active mgr
Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit
25a9f5ab0bb8d3e050c8714ec3539feb3b2febf5)
spec = cast(NvmeofServiceSpec, self.mgr.spec_store[daemon_spec.service_name].spec)
igw_id = daemon_spec.daemon_id
+ host_ip = self.mgr.inventory.get_addr(daemon_spec.host)
keyring = self.get_keyring_with_caps(self.get_auth_entity(igw_id),
['mon', 'profile rbd',
context = {
'spec': spec,
'name': name,
- 'addr': self.mgr.get_mgr_ip(),
+ 'addr': host_ip,
'port': spec.port,
'log_level': 'WARN',
'rpc_socket': '/var/tmp/spdk.sock',
def test_nvmeof_dashboard_config(self, mock_resolve_ip):
pass
- @patch("cephadm.module.CephadmOrchestrator.get_mgr_ip", lambda _: '192.168.100.100')
+ @patch("cephadm.inventory.Inventory.get_addr", lambda _, __: '192.168.100.100')
@patch("cephadm.serve.CephadmServe._run_cephadm")
@patch("cephadm.module.CephadmOrchestrator.get_unique_name")
def test_nvmeof_config(self, _get_name, _run_cephadm, cephadm_module: CephadmOrchestrator):