Repository navigation
squid: mgr/orchestrator: fix nvmeof group parameter for backward compatibility - #67623
Merged
Merged
Conversation
- make service_id better alligned with default/empty group (ceph@f6d552d) - fix service_id in nvmeof daemon add Signed-off-by: Alexander Indenbaum <[email protected]> (cherry picked from commit e1612d0)
14 tasks
Contributor
Author
|
jenkins test make check |
Contributor
Author
retriggering.. |
Contributor
Author
|
jenkins test api |
Contributor
Author
|
jenkins test make check |
Contributor
Author
|
the "ceph API tests" test failure should be addressed by #67199 |
Add default value for group parameter in nvmeof commands to maintain backward compatibility with existing squid tests and deployments. Context: -------- On main branch, when commit 6bee4e1 added the group parameter, the tests were subsequently updated to provide the group argument explicitly: Main test: ceph orch apply nvmeof foo default Expected: nvmeof.foo.default However, on squid branch, the existing tests still use the older syntax without specifying a group: Squid test: ceph orch apply nvmeof foo Expected: nvmeof.foo The previous cherry-pick (e1612d0) fixed the service_id construction logic to handle empty groups correctly, but the group parameter was still required without a default value, causing "ceph orch apply nvmeof foo" to fail with EINVAL (missing required argument). This commit adds the missing default value (group: str = '') to make the parameter optional, maintaining backward compatibility with existing squid tests and user scripts that don't specify a group. With both changes: 1. Cherry-picked e1612d0: service_id logic handles empty group 2. This commit: group parameter has default value '' Result: "ceph orch apply nvmeof foo" works (creates nvmeof.foo) "ceph orch apply nvmeof foo mygroup" also works (creates nvmeof.foo.mygroup) Test: qa/suites/orch/cephadm/smoke-roleless/2-services/nvmeof.yaml Fixes job 50373 failure from test run dgalloway-2026-02-13_23:06:25 Please note, this change was not cherry-picked from main branch, because main intentionally still requires the CLI group argument for arch apply/add nvmeof, and its tests were updated accordingly. On squid, however, the earlier cherry-pick 6bee4e1 introduced the required group parameter, but squid still has the old test/behavior (ceph orch apply nvmeof foo expecting nvmeof.foo) and does not contain the later main commits 3e5e85a and b377085. Signed-off-by: Kefu Chai <[email protected]>
tchaikov
force-pushed
the
wip-squid-nvmeof-group-fix
branch
from
March 9, 2026 12:24
086891d to
5cef25d
Compare
batrick
approved these changes
Mar 18, 2026
afreen23
pushed a commit
to rhcs-dashboard/ceph
that referenced
this pull request
Jul 29, 2026
* refs/pull/67623/head: mgr/orchestrator: make group parameter optional for nvmeof (squid) pybind/mgr/orchestrator/module.py: NvmeofServiceSpec service_id Reviewed-by: Patrick Donnelly <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes a test failure in the smoke-roleless nvmeof test where
"ceph orch apply nvmeof " fails due to a missing required argument.
Problem
Job 50373 from test run dgalloway-2026-02-13_23:06:25 fails with:
The command fails with exit status 22 (EINVAL) due to a missing required
positional argument 'group'.
Test case:
qa/suites/orch/cephadm/smoke-roleless/2-services/nvmeof.yamlPulpito job link:
https://pulpito.ceph.com/dgalloway-2026-02-13_23:06:25-orch:cephadm-wip-squid-pr-67199-kefu-1-distro-default-trial/50373/
Root Cause
When commit 6bee4e1 ("mgr/orchestrator: allow passing group to
apply/add nvmeof commands") was cherry-picked from main to squid, it added
a group parameter to nvmeof commands but made it required without providing
a default value:
Additionally, the service_id construction used
f'{pool}.{group}'whichwould create service IDs with trailing dots (e.g., "foo.") when group is
empty.
On main branch, the follow-up fix (commit e1612d0) addressed the
service_id issue, but was never cherry-picked to squid. Furthermore, on
main the tests were updated to provide the group argument explicitly:
Main test:
- ceph orch apply nvmeof foo defaultBut squid tests still use the backward-compatible syntax without group:
Squid test:
- ceph orch apply nvmeof fooSolution
This PR applies two commits:
Cherry-pick e1612d0 from main: Fixes the service_id construction
logic to properly handle empty groups. This uses
git cherry-pick -xtopreserve the original author attribution.
Add default value for group parameter: Squid-specific change to make
the group parameter optional (group: str = '') for backward compatibility
with existing tests and user scripts.
After these changes:
ceph orch apply nvmeof fooworks (creates service nvmeof.foo)ceph orch apply nvmeof foo mygroupalso works (creates service nvmeof.foo.mygroup)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
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.