Skip to content

cephadm: give cephadm the dedicated SSH key - #1159

Merged
berendt merged 1 commit into
mainfrom
docs/cephadm-migration-ceph-key
Nov 26, 2026
Merged

berendt merged 1 commit into
mainfrom
docs/cephadm-migration-ceph-key

Conversation

@ideaship

Copy link
Copy Markdown
Contributor

The migration guide imported the operator key into cephadm in Step 4. cephadm keeps that key in the Ceph config store, where anyone with Ceph admin access can read it back, so a migrated cluster handed out the key that reaches every host of the deployment. New deployments on OSISM 11 give cephadm a dedicated key, authorized on the ceph group only; the migration guide did not.

Changes

  • New section "The cephadm SSH key":
    • adding ceph_ssh_private_key, ceph_public_key and inventory/group_vars/ceph.yml to a configuration repository from OSISM 10 or earlier
    • getting the key onto the manager and the Ceph nodes (osism apply configuration, osism sync inventory, osism apply manager, osism apply operator -- --limit ceph)
    • two checks before Step 4: the file is a real key and not the manager role's placeholder default, and it logs in to every Ceph node without the operator key the manager's SSH configuration offers
  • Step 4 imports id_rsa.ceph, and says the import has to come before the nodes are registered.
  • The generate-key alternative is removed.

On OSISM 10, which cannot provide the dedicated key, Step 4 still imports the operator key. Moving such a cluster to the dedicated key after the upgrade to OSISM 11 is a separate procedure, not part of this PR.

Testing

Blind run of the Prerequisites (including the new section) and Steps 1–4 by an agent that only had the guide text, on a testbed deployed with OSISM 10.3.0 (Ceph Reef, ceph-ansible) and upgraded to 11.0.3, with its configuration reduced to what an OSISM 10 repository has:

  • both checks caught the placeholder key the manager role writes without ceph_ssh_private_key, then passed once the key was added as described
  • cephadm accepted id_rsa.ceph; all six hosts registered, ceph orch status reports Backend: cephadm

Two deviations, both due to the testbed: osism apply configuration was skipped (it resets the testbed's checkout), and secrets.yml was edited directly (not encrypted there).

markdownlint and the Docusaurus build pass.

🤖 Generated with Claude Code

Step 4 of the migration guide imported the operator key into cephadm.
cephadm keeps the key it is given in the Ceph config store, where
anyone with Ceph admin access can read it back, so the migration handed
out the key that reaches every host of the deployment. New deployments
on OSISM 11 give cephadm a key of its own, authorized on the ceph group
only; the guide did not.

The guide gains a section on that key. A configuration repository from
OSISM 10 or earlier has none of it, so the section says what to add
(ceph_ssh_private_key, ceph_public_key, inventory/group_vars/ceph.yml),
how it reaches the manager and the Ceph nodes, and how to check it
before Step 4: the manager role's placeholder default writes a file
even without the key, and a login check has to bypass the manager's
SSH configuration, which offers the operator key for every node. The
checks come before Step 4 because Step 4 switches the orchestrator to
cephadm before it imports the key.

Step 4 imports id_rsa.ceph, and says the import has to come before the
nodes are registered. On OSISM 10, which cannot provide the dedicated
key, it still imports the operator key; moving such a cluster to the
dedicated key after the upgrade is left to a separate procedure.

The generate-key alternative is removed: with the dedicated key there
is always a key to import, and generating one in cephadm gave a
different setup from the one the guide describes.

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Roger Luethi <luethi@osism.tech>
@github-actions

Copy link
Copy Markdown

✅⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Max errors Warnings Elapsed time
✅ ACTION actionlint 5 0 0 0.05s
✅ JSON jsonlint 4 0 0 0.1s
✅ JSON prettier 4 0 0 0.23s
✅ JSON v8r 4 0 0 7.13s
✅ MARKDOWN markdownlint 184 0 0 2.58s
✅ MARKDOWN markdown-table-formatter 184 0 0 0.31s
✅ REPOSITORY betterleaks yes no no 0.55s
✅ REPOSITORY checkov yes no no 15.81s
✅ REPOSITORY git_diff yes no no 0.07s
✅ REPOSITORY secretlint yes no no 1.18s
✅ REPOSITORY trufflehog yes no no 2.6s
✅ SPELL codespell 194 0 0 0.53s
⚠️ SPELL lychee 190 2 0 51.28s
✅ YAML prettier 6 0 0 0.36s
✅ YAML v8r 6 0 0 5.52s
✅ YAML yamllint 6 0 0 0.43s

Detailed Issues

⚠️ SPELL / lychee - 2 errors
📝 Summary
---------------------
🔍 Total.........1311
🔗 Unique.........961
✅ Successful....1184
⏳ Timeouts.........9
🔀 Redirected.......1
👻 Excluded.......116
❓ Unknown..........0
🚫 Errors...........2
⛔ Unsupported......2

Errors in docs/appendix/security/ossa-2026-002.md
[TIMEOUT] https://bugs.launchpad.net/nova/+bug/2137507 (at 134:3) | Request timed out

Errors in docs/appendix/security/ossa-2026-022.md
[TIMEOUT] https://bugs.launchpad.net/nova/+bug/2151252 (at 159:3) | Request timed out

Errors in docs/appendix/security/ossa-2026-032.md
[TIMEOUT] https://bugs.launchpad.net/neutron/+bug/2152113 (at 271:3) | Request timed out

Errors in docs/appendix/security/ossa-2026-034.md
[TIMEOUT] https://bugs.launchpad.net/designate/+bug/2142581 (at 179:5) | Request timed out
[TIMEOUT] https://bugs.launchpad.net/designate/+bug/2142581 (at 254:3) | Request timed out

Errors in docs/appendix/security/ossa-2026-038.md
[TIMEOUT] https://bugs.launchpad.net/glance/+bug/2158998 (at 124:3) | Request timed out
[TIMEOUT] https://bugs.launchpad.net/glance/+bug/2160020 (at 127:3) | Request timed out

Errors in docs/appendix/security/ossa-2026-039.md
[TIMEOUT] https://bugs.launchpad.net/octavia/+bug/2167565 (at 389:3) | Request timed out

Errors in docs/appendix/security/ossa-2026-045.md
[TIMEOUT] https://bugs.launchpad.net/cinder/+bug/2160671 (at 273:3) | Request timed out

Errors in docs/guides/developer-guide/style-guide.md
[ERROR] https://wiki.openstack.org/wiki/GitCommitMessages (at 79:1) | Network unreachable. Check internet connection or VPN settings

Errors in docs/guides/operations-guide/openstack/tools/openstack-health-monitor.md
[503] https://github.com/SovereignCloudStack/openstack-health-monitor/blob/main/startup/README.md (at 325:99) | Rejected status code: 503 Service Unavailable

Hint: Followed 1 redirect. You might want to consider replacing redirecting URLs with the resolved URLs. Use verbose mode (`-v`/`-vv`) to see redirection details.

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@10.2.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,JSON_JSONLINT,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_BETTERLEAKS,REPOSITORY_SECRETLINT,REPOSITORY_TRUFFLEHOG,SPELL_LYCHEE,SPELL_CODESPELL,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is provided by OX Security
Show us your support by starring ⭐ the repository

@ideaship
ideaship marked this pull request as ready for review November 26, 2026 12:34
@ideaship
ideaship requested a review from berendt November 26, 2026 12:34
@berendt
berendt merged commit b92283c into main Nov 26, 2026
6 checks passed
@berendt
berendt deleted the docs/cephadm-migration-ceph-key branch November 26, 2026 19:24
@github-project-automation github-project-automation Bot moved this from New to Done in Human Board Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants