]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/ssh: simplify ssh connection management
authorSage Weil <sage@redhat.com>
Tue, 1 Oct 2019 15:29:53 +0000 (10:29 -0500)
committerSage Weil <sage@redhat.com>
Sat, 5 Oct 2019 01:33:35 +0000 (20:33 -0500)
commit24049fcda4c699715f6946f08ee3d1e0fe26b1c3
tree215204603fccb85c0d6275019cffa4d4c60d1dc9
parent636a0b2e6b016f9420e21d690dfd6110b26fd8f7
mgr/ssh: simplify ssh connection management

- Use a single instance of the config and identity files for the whole
module.  There's no need to create these for *every* connection--it just
pollutes /tmp.
- Drop the SSHConnection wrapper, since the temp files are tied to the
daemon lifecycle now.
- Prefix the tmp files so I can tell wtf is going on.
- Always connect to root@host, to avoid remoto's localhost detection
feature.  This ensures we have a consistent connection model and user.
(The daemon might be running as user ceph and try to connect to localhost,
but end up running the command as the wrong user and/or inside the
ceph-mgr container.)

Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/ssh/module.py