]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: fix bootstrap ordering, configure SSH keys before set-user
authorShweta Bhosale <Shweta.Bhosale1@ibm.com>
Thu, 2 Apr 2026 06:42:47 +0000 (12:12 +0530)
committerShweta Bhosale <Shweta.Bhosale1@ibm.com>
Thu, 11 Jun 2026 05:10:33 +0000 (10:40 +0530)
Fixes: https://tracker.ceph.com/issues/74045
Signed-off-by: Shweta Bhosale <Shweta.Bhosale1@ibm.com>
src/cephadm/cephadm.py

index 34e1f1b5ed2027b35c392cb792ec272aeacddd31..c98805f6c7f9e8fdb9be5c2b1dfdb0cc0f81d75e 100755 (executable)
@@ -2431,8 +2431,7 @@ def prepare_ssh(
     cli: Callable, wait_for_mgr_restart: Callable
 ) -> None:
 
-    cli(['cephadm', 'set-user', ctx.ssh_user])
-
+    # SSH identity must be in the mgr before set-user
     if ctx.ssh_config:
         logger.info('Using provided ssh config...')
         mounts = {
@@ -2467,6 +2466,8 @@ def prepare_ssh(
         logger.info('Wrote public SSH key to %s' % ctx.output_pub_ssh_key)
         authorize_ssh_key(ssh_pub, ctx.ssh_user)
 
+    cli(['cephadm', 'set-user', ctx.ssh_user])
+
     host = get_hostname()
     logger.info('Adding host %s...' % host)
     try: