]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: Allow adding all listeners unders a subsystems 60078/head
authorAfreen Misbah <afreen23.git@gmail.com>
Wed, 25 Sep 2024 11:15:10 +0000 (16:45 +0530)
committerAfreen Misbah <afreen23.git@gmail.com>
Tue, 1 Oct 2024 14:48:48 +0000 (20:18 +0530)
commit1d8f92f0cb790e245aa4bdd90e2f960839647709
treee0415b73c9fd4968e01864286b6436e56bd0b841
parente3beff2159e1dcdbb6db3b98253a9e2088a02889
mgr/dashboard: Allow adding all listeners unders a subsystems

Issue:

- Currently a user cannot add all listeners under a subsystem
- This results into an error: `Failure adding nqn.2001-07.com.ceph:1725013182540 listener at 10.70.44.140:4420: Gateway's host name must match current host (dhcp47-54)`

Reason:

- The gateway address used while creating listener is random now in nvmeof client
- After checking the gateway logs of each node, its is found that no grpc request recieved for adding listener on the respective node rather going to the node that is chosen by default in nvmeof client.
- But nvmeof backend check that current gateway matches the one with sent in request for adding listener (ref: https://github.com/ceph/ceph-nvmeof/blob/devel/control/grpc.py#L2104)

Fix:

- Using `traddr` from listener API to set the current gateway address
- Since `traddr` gives only IP address, without port therefore extracting full address from `NvmeofGatewaysConfig.get_gateways_config()`
- This ensures correct path usage

Fixes https://tracker.ceph.com/issues/68229
Signed-off-by: Afreen Misbah <afreen23.git@gmail.com>
(cherry picked from commit 287ff3b3603291763b3cd08f9b1543fe60d5f3b9)
src/pybind/mgr/dashboard/controllers/nvmeof.py
src/pybind/mgr/dashboard/services/nvmeof_client.py