From: Shweta Bhosale Date: Mon, 20 Apr 2026 04:37:47 +0000 (+0530) Subject: mgr/cephadm: Handled cephadm binary creation with different ssh user X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9b9493345aa5d93179a630d1ccd8be9362c600f2;p=ceph.git mgr/cephadm: Handled cephadm binary creation with different ssh user Since we execute the cephadm binary directly with sudo, we get exit code 1 with a “command not found” error if the binary does not exist. Handled it in run_cephadm to generate cephadm binary in this case. Fixes: https://tracker.ceph.com/issues/74045 Signed-off-by: Shweta Bhosale --- diff --git a/src/pybind/mgr/cephadm/serve.py b/src/pybind/mgr/cephadm/serve.py index 0f284942398..71ae061cda6 100644 --- a/src/pybind/mgr/cephadm/serve.py +++ b/src/pybind/mgr/cephadm/serve.py @@ -1801,7 +1801,7 @@ class CephadmServe: try: out, err, code = await self.mgr.ssh._execute_command( host, cmd, stdin=stdin, addr=addr) - if code == 2 or code == 127: + if code == 2 or code == 127 or 'command not found' in err: # Use invoker to check file existence when SSH hardening is enabled if self.mgr.sudo_hardening and self.mgr.invoker_path: check_cmd = ssh.RemoteCommand(