Skip to content

mon: Add command "nvme-gw listeners" - #65689

Merged
VallariAg merged 1 commit into
ceph:mainfrom
VallariAg:wip-listener-mon-cmd
Dec 9, 2025
Merged

VallariAg merged 1 commit into
ceph:mainfrom
VallariAg:wip-listener-mon-cmd

Conversation

@VallariAg

@VallariAg VallariAg commented Sep 26, 2025 •

Copy link
Copy Markdown
Member

This command will help to list all existing listeners, even when they are not in OMAP (eg, auto-listeners).
We need this for ceph/ceph-nvmeof#1381 which adds functionality to automatically add nvmeof listeners during subsystem creation. These auto-listeners are not added to gateway OMAP, so we use this command to fetch list of all listeners for listeners list and discovery (where previously we relied on listeners in OMAP).

[root@cephnvme-vm14 ~]# ceph nvme-gw listeners mypool mygroup1
{
    "epoch": 227,
    "pool": "mypool",
    "group": "mygroup1",
    "num gws": 4,
    "GW-epoch": 104,
    "Created listeners": {
        "nqn.2016-06.io.spdk:cnode1.mygroup1": [
            {
                "address_family": "IPv4",
                "address": "x.x.x.x",
                "svcid": "4420",
                "gw_id": "client.nvmeof.mypool.mygroup1.cephnvme-vm11.wkhnad"
            },
            {
                "address_family": "IPv4",
                "address": "x.x.x.x",
                "svcid": "4420",
                "gw_id": "client.nvmeof.mypool.mygroup1.cephnvme-vm12.ufzcff"
            },
            {
                "address_family": "IPv4",
                "address": "x.x.x.x",
                "svcid": "4420",
                "gw_id": "client.nvmeof.mypool.mygroup1.cephnvme-vm13.spniyr"
            },
            {
                "address_family": "IPv4",
                "address": "x.x.x.x",
                "svcid": "4420",
                "gw_id": "client.nvmeof.mypool.mygroup1.cephnvme-vm14.taquiu"
            }
        ],
        "nqn.2016-06.io.spdk:cnode99.mygroup1": [
            {
                "address_family": "IPv4",
                "address": "x.x.x.x",
                "svcid": "4420",
                "gw_id": "client.nvmeof.mypool.mygroup1.cephnvme-vm11.wkhnad"
            },
            {
                "address_family": "IPv4",
                "address": "x.x.x.x",
                "svcid": "4420",
                "gw_id": "client.nvmeof.mypool.mygroup1.cephnvme-vm12.ufzcff"
            },
            {
                "address_family": "IPv4",
                "address": "x.x.x.x",
                "svcid": "4420",
                "gw_id": "client.nvmeof.mypool.mygroup1.cephnvme-vm13.spniyr"
            },
            {
                "address_family": "IPv4",
                "address": "x.x.x.x",
                "svcid": "4420",
                "gw_id": "client.nvmeof.mypool.mygroup1.cephnvme-vm14.taquiu"
            }
        ]
    }
}

https://shaman.ceph.com/builds/ceph/wip-listener-mon-cmd-centos9-only/ce370b2291233902df80b10212d6ccb6898fab7d/default/452837/

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@VallariAg
VallariAg requested review from caroav and leonidc September 26, 2025 07:48
@VallariAg
VallariAg marked this pull request as ready for review October 17, 2025 12:49
@VallariAg
VallariAg requested a review from a team as a code owner October 17, 2025 12:49
Comment thread src/mon/NVMeofGwMon.cc Resolved
@VallariAg
VallariAg force-pushed the wip-listener-mon-cmd branch from 7b14252 to 9e38d96 Compare November 11, 2025 08:29
@VallariAg
VallariAg requested a review from leonidc November 11, 2025 08:32
@VallariAg
VallariAg requested a review from athanatos November 13, 2025 11:13

@athanatos athanatos left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than the formatting error.

Comment thread src/mon/NVMeofGwMon.cc Resolved
This command will help to list all existing listeners,
even when they are not in OMAP (eg, auto-listeners).

Fixes: https://tracker.ceph.com/issues/73782

Signed-off-by: Vallari Agrawal <[email protected]>
@VallariAg

Copy link
Copy Markdown
Member Author

@Naveenaidu

Copy link
Copy Markdown
Contributor

RADOS Approved: https://tracker.ceph.com/issues/73968#note-3

@VallariAg
VallariAg merged commit 0df8f65 into ceph:main Dec 9, 2025
@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I have resolved the following tracker ticket due to the merge of this PR:

No backports are pending for the ticket. If this is incorrect, please update the tracker
ticket and reset to Pending Backport state.

Update Log: https://github.com/ceph/ceph/actions/runs/20055396748

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants