]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/cephadm: adding cephadm deploy-file command for mgr file writes
authorShweta Bhosale <Shweta.Bhosale1@ibm.com>
Thu, 14 May 2026 09:20:16 +0000 (14:50 +0530)
committerShweta Bhosale <Shweta.Bhosale1@ibm.com>
Thu, 11 Jun 2026 05:10:34 +0000 (10:40 +0530)
commit4d35c61283ca61b975f1cd44010bd24cc6bfdf02
tree539df4b41da8e9b0299f02538a12fb3b00d28eb7
parent56895ee07b9cf9d23ae46d7d71e7316cd3320227
mgr/cephadm: adding cephadm deploy-file command for mgr file writes

Add a cephadm "deploy-file" subcommand that reads raw file bytes from stdin
and atomically installs them at an absolute destination (--fsid, --path,
optional --mode, --uid/--gid). Use it from the mgr for client conf/keyring
sync and tuned profiles instead of SSHManager.write_remote_file.
Keep staging the cephadm binary over SSH via _write_remote_file when sudo
hardening is off, the invoker deploy_binary path is unchanged when hardening
is on.
SSH: pass encoding=None to asyncssh conn.run when stdin is bytes so binary
payloads (deploy-file) are not UTF-8-encoded as str. Only add the input kwarg
when stdin is not None.

Fixes: https://tracker.ceph.com/issues/74045
Signed-off-by: Shweta Bhosale <Shweta.Bhosale1@ibm.com>
doc/man/8/cephadm.rst
src/cephadm/cephadm.py
src/cephadm/cephadmlib/file_utils.py
src/cephadm/tests/test_cephadm.py
src/pybind/mgr/cephadm/serve.py
src/pybind/mgr/cephadm/ssh.py
src/pybind/mgr/cephadm/tests/test_cephadm.py
src/pybind/mgr/cephadm/tests/test_tuned_profiles.py
src/pybind/mgr/cephadm/tuned_profiles.py