Skip to content

mgr/dashboard: NVMeoF CLI fix the error message when not providing a required param - #70774

Merged
Hezko merged 1 commit into
ceph:mainfrom
Hezko:fix-listener-del-err
Aug 4, 2026
Merged

Hezko merged 1 commit into
ceph:mainfrom
Hezko:fix-listener-del-err

Conversation

@Hezko

@Hezko Hezko commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

replaced the cryptic error message with a clear one for the case of missing required parameter.
before:

[xxx@xxx ~]# ceph nvmeof listener del --nqn nqn.2016-06.io.spdk:cnode1.mygroup1 --host_name test-node1 --traddr <node ip>
Error EINVAL: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

after:

[xxx@xxx ~]# ceph nvmeof listener del --nqn nqn.2016-06.io.spdk:cnode1.mygroup1 --host_name test-node1 --traddr <node ip>
Error EINVAL: missing required parameter: --trsvcid

fixes: https://tracker.ceph.com/issues/78959

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.

@Hezko
Hezko requested review from afreen23 and pujaoshahu August 3, 2026 07:22
@Hezko Hezko self-assigned this Aug 3, 2026
@Hezko
Hezko requested a review from a team as a code owner August 3, 2026 07:22
Copilot AI review requested due to automatic review settings August 3, 2026 07:22

Copilot AI 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.

Pull request overview

Improves NVMe-oF CLI feedback when required parameters are omitted.

Changes:

  • Adds required-parameter validation.
  • Adds a regression test for missing --trsvcid.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/pybind/mgr/dashboard/services/nvmeof_cli.py Adds required-argument error handling.
src/pybind/mgr/dashboard/tests/test_nvmeof_cli.py Tests missing listener port behavior.

Copilot AI review requested due to automatic review settings August 3, 2026 07:38
@Hezko
Hezko force-pushed the fix-listener-del-err branch from 2d77d2e to e33fe89 Compare August 3, 2026 07:38

Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@Hezko
Hezko force-pushed the fix-listener-del-err branch from e33fe89 to 0c8369f Compare August 3, 2026 07:53
Copilot AI review requested due to automatic review settings August 3, 2026 07:53

Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings August 3, 2026 10:15
@Hezko
Hezko force-pushed the fix-listener-del-err branch from 0c8369f to 13f9e5d Compare August 3, 2026 10:15

Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

"traddr": "10.0.65.113",
# trsvcid intentionally omitted
}
result = cmd.call(mgr=None, cmd_dict=cmd_dict, inbuf=None)

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.

Nit: move import errno as _errno to the top of the file with the other imports instead of inside the test body. The module-level import errno should already be available or can be added once at the top.

Otherwise the fix and test look correct. The _check_required_params logic correctly stops at first_default and skips KNOWN_ARGS.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

haha it turns out an errno import is already there at the top of the file, so I just removed those lines. thanks for catching that!!

Copilot AI review requested due to automatic review settings August 3, 2026 19:52
@Hezko
Hezko force-pushed the fix-listener-del-err branch from 13f9e5d to 3d3e7d2 Compare August 3, 2026 19:52

Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@Hezko

Hezko commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

jenkins test make check arm64

@Hezko
Hezko requested a review from afreen23 August 4, 2026 06:40

@afreen23 afreen23 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

@github-project-automation github-project-automation Bot moved this from New to Reviewer approved in Ceph-Dashboard Aug 4, 2026
@Hezko
Hezko merged commit 96d5579 into ceph:main Aug 4, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in Ceph-Dashboard Aug 4, 2026
@Hezko
Hezko deleted the fix-listener-del-err branch August 4, 2026 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants