]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
cephadm: Detect stale and then recreate connections
authorMatthew Oliver <moliver@suse.com>
Thu, 28 May 2020 01:59:19 +0000 (11:59 +1000)
committerMatthew Oliver <moliver@suse.com>
Thu, 28 May 2020 05:58:15 +0000 (15:58 +1000)
commitafabf82395361f5d2209a980578b4b6715d80f3d
treeb40b95598feabb9ee27e2f147bd61db238ef9b78
parenta032ece19b9bee2238884ea73780ac8cdb046166
cephadm: Detect stale and then recreate connections

Currently we make and cache connections to nodes during a check_host.
If a cached connection is disconnect from the other end the remoto
connection object doesn't track this, so further checks to the host
fail.

I have pushed up a PR[0] to remoto to add a `has_connection` method to
their `BaseConnection` class, which we now use in this patch to check to
see if the connection is stale. If it is it is then recreated.

There is some monkey patching happening so we can add the required
`has_connection` to remoto in this patch which we can remove as soon as
the other PR have landed and a new version of remoto is released.

[0] https://github.com/alfredodeza/remoto/pull/56
Fixes: https://tracker.ceph.com/issues/45627
Fixes: https://tracker.ceph.com/issues/45032
Signed-off-by: Matthew Oliver <moliver@suse.com>
src/pybind/mgr/cephadm/module.py
src/pybind/mgr/cephadm/tests/test_cephadm.py