Skip to content

mgr/cephadm: store nvmeof mtls certs in sub-directory - #70237

Merged
adk3798 merged 1 commit into
ceph:mainfrom
adk3798:cephadm-nvmeof-mount-mtls-certs-in-dir
Aug 6, 2026
Merged

adk3798 merged 1 commit into
ceph:mainfrom
adk3798:cephadm-nvmeof-mount-mtls-certs-in-dir

Conversation

@adk3798

@adk3798 adk3798 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

This a requirement of nvmeof that the mtls certs are not stored in the root directory. Since cephadm controls the conf template and where the certs are mounted, we can just change both to be somewhere not in the root directory.

/certs/mtls was chosen fairly arbitrarily

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

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.

@adk3798
adk3798 requested a review from a team as a code owner July 15, 2026 18:42
@adk3798 adk3798 added the nvmeof label Jul 15, 2026

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

@VallariAg VallariAg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nvmeof teuthology test failed: https://pulpito.ceph.com/vallariag-2026-07-16_12:56:40-nvmeof-wip-vallari-testing-mtls-distro-default-trial/

Error in nvmeof gateways initialisation due to "Error: statfs /var/lib/ceph/e4f9c4b7-8117-11f1-976f-d404e6e7d460/nvmeof.nvmeof.b/encryption_key: no such file or directory":

2026-07-16T13:14:06.440 INFO:[email protected]:Jul 16 13:14:06 trial127 bash[46136]: Writing manifest to image destination
2026-07-16T13:14:06.440 INFO:[email protected]:Jul 16 13:14:06 trial127 bash[46136]: Error: statfs /var/lib/ceph/e4f9c4b7-8117-11f1-976f-d404e6e7d460/nvmeof.nvmeof.b/encryption_key: no such file or directory
2026-07-16T13:14:06.440 INFO:[email protected]:Jul 16 13:14:06 trial127 podman[46136]: 2026-07-16 13:14:06.128514668 +0000 UTC m=+4.555711208 image pull abd4476edddfabe604786562aeef6d57974c66417b82488875cc849b7e47e524 quay.io/ceph/nvmeof:devel
2026-07-16T13:14:06.440 INFO:[email protected]:Jul 16 13:14:06 trial127 systemd[1]: ceph-e4f9c4b7-8117-11f1-976f-d404e6e7d460@nvmeof.nvmeof.b.service: Control process exited, code=exited, status=125/n/a
2026-07-16T13:14:06.440 INFO:[email protected]:Jul 16 13:14:06 trial127 systemd[1]: ceph-e4f9c4b7-8117-11f1-976f-d404e6e7d460@nvmeof.nvmeof.b.service: Failed with result 'exit-code'.
2026-07-16T13:14:06.441 INFO:[email protected]:Jul 16 13:14:06 trial127 systemd[1]: Failed to start ceph-e4f9c4b7-8117-11f1-976f-d404e6e7d460@nvmeof.nvmeof.b.service - Ceph nvmeof.nvmeof.b for e4f9c4b7-8117-11f1-976f-d404e6e7d460.
2026-07-16T13:14:06.441 INFO:[email protected]:Jul 16 13:14:06 trial127 systemd[1]: ceph-e4f9c4b7-8117-11f1-976f-d404e6e7d460@nvmeof.nvmeof.b.service: Consumed 6.887s CPU time, 1.1G memory peak.

os.path.join(data_dir, fn)
] = f'/{fn.replace("_", ".")}'
] = f'/certs/mtls/{fn.replace("_", ".")}'
mounts[os.path.join(data_dir, 'encryption_key')] = '/encryption.key'

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.

This seems wrong. It will mount /encryption.key as a directory instead a data file.

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.

the f'/{fn.replace("_", ".")}' from before should have come out to the same thing. This line was just maintaining old behavior for the encryption key. fn would have been encryption_key

@adk3798
adk3798 force-pushed the cephadm-nvmeof-mount-mtls-certs-in-dir branch from c01ac9a to 91809aa Compare July 22, 2026 14:07
@VallariAg

Copy link
Copy Markdown
Member

This PR has been added to wip-vallari2-testing-20260723.114249-main.

This a requirement of nvmeof that the mtls certs are
not stored in the root directory. Since cephadm controls
the conf template and where the certs are mounted, we can
just change both to be somewhere not in the root directory.

/certs/mtls was chosen fairly arbitrarily

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

Signed-off-by: Adam King <[email protected]>
@adk3798
adk3798 force-pushed the cephadm-nvmeof-mount-mtls-certs-in-dir branch from 91809aa to ee2098c Compare July 23, 2026 12:57
@VallariAg
VallariAg dismissed their stale review July 23, 2026 15:19

nvmeof suite passing now

@adk3798
adk3798 merged commit b81d767 into ceph:main Aug 6, 2026
6 checks passed
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

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

I found one or more Fixes: tags in the commit messages in

git log b81d767ba9b786fd287ba9280c81a02f405bdc9e^..b81d767ba9b786fd287ba9280c81a02f405bdc9e

The referenced tickets are:

Those tickets do not reference this merged Pull Request. If this Pull Request merge resolves any of those tickets, please update the "Pull Request ID" field on each ticket. A future run of this script will appropriately update them.

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

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.

4 participants