Skip to content

Conversation

@nixpanic
Copy link
Member

@nixpanic nixpanic commented Sep 23, 2025

Add support for the ceph nvme-gw ... command series.

Only three commands are available at the moment, create/delete/show:

https://github.com/ceph/ceph/blob/2b14a6730a7d525fdcd14d23af310045ee4bbd6b/src/mon/MonCommands.h#L1435-L1453

The JSON has funky keys, including spaces and dashes. For example:

$ ceph nvme-gw show ocs-storagecluster-cephblockpool nqn.2016-06.io.ceph:openshift-storage
{
    "epoch": 10,
    "pool": "replicapool",
    "group": "nqn.2016-06.io.ceph:testing",
    "features": "LB",
    "rebalance_ana_group": 1,
    "num gws": 1,
    "GW-epoch": 6,
    "Anagrp list": "[ 1 ]",
    "num-namespaces": 0,
    "Created Gateways:": [
        {
            "gw-id": "ceph-nvmeof-gateway-7cbbf866d5-zc4gn",
            "anagrp-id": 1,
            "num-namespaces": 0,
            "performed-full-startup": 1,
            "Availability": "CREATED",
            "ana states": " 1: STANDBY "
        }
    ]
}

NOTE:: this is a Draft for now, testing is still a major outstanding task.

Checklist

  • Added tests for features and functional changes
  • Public functions and types are documented
  • Standard formatting is applied to Go code
  • Is this a new API? Added a new file that begins with //go:build ceph_preview
  • Ran make api-update to record new APIs

@phlogistonjohn
Copy link
Collaborator

Those keys are a serious Yikes! They aren't even consistent (like all dashes or all spaces).
Things like that seriously make me wonder.

Copy link
Collaborator

@phlogistonjohn phlogistonjohn left a comment

Choose a reason for hiding this comment

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

The general gist of things looks OK to me. You have a bunch of little things to clean up to make the CI happy: like missing comments and updating the api status.

@nixpanic
Copy link
Member Author

I'm 😭 The key Created Gateways: contains a :... Missed this and wondered why the gateways never get set... Aaaaaah!

@nixpanic nixpanic marked this pull request as ready for review October 13, 2025 15:22
@nixpanic nixpanic marked this pull request as draft October 13, 2025 15:55
@nixpanic nixpanic marked this pull request as ready for review October 13, 2025 15:59
phlogistonjohn
phlogistonjohn previously approved these changes Oct 13, 2025
@phlogistonjohn phlogistonjohn added the API This PR includes a change to the public API of a go-ceph package label Oct 13, 2025
Signed-off-by: Niels de Vos <ndevos@ibm.com>
Signed-off-by: Niels de Vos <ndevos@ibm.com>
@mergify mergify bot dismissed phlogistonjohn’s stale review October 14, 2025 12:20

Pull request has been modified.

Copy link
Collaborator

@anoopcs9 anoopcs9 left a comment

Choose a reason for hiding this comment

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

lgtm, thanks.

@mergify mergify bot added the queued label Oct 14, 2025
@mergify mergify bot merged commit 96bd37f into ceph:master Oct 14, 2025
16 checks passed
@mergify mergify bot removed the queued label Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API This PR includes a change to the public API of a go-ceph package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants