Add has_connection to BaseConnection#56
Merged
alfredodeza merged 1 commit intoalfredodeza:masterfrom Jun 12, 2020
Merged
Conversation
If the other end of a connection dies it would be good to have a way to check if it's still alive without having to send a command and catch an error. This patch adds a `has_connection` method to `BaseConnection`. We want to use it in the ceph orchestrator to be able to check the state of the connection for longer lived health checks. Signed-off-by: Matthew Oliver <moliver@suse.com>
matthewoliver
pushed a commit
to matthewoliver/ceph
that referenced
this pull request
May 28, 2020
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] alfredodeza/remoto#56 Fixes: https://tracker.ceph.com/issues/45627 Fixes: https://tracker.ceph.com/issues/45032 Signed-off-by: Matthew Oliver <moliver@suse.com>
matthewoliver
pushed a commit
to matthewoliver/ceph
that referenced
this pull request
May 28, 2020
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] alfredodeza/remoto#56 Fixes: https://tracker.ceph.com/issues/45627 Fixes: https://tracker.ceph.com/issues/45032 Signed-off-by: Matthew Oliver <moliver@suse.com>
matthewoliver
pushed a commit
to matthewoliver/ceph
that referenced
this pull request
May 28, 2020
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] alfredodeza/remoto#56 Fixes: https://tracker.ceph.com/issues/45627 Fixes: https://tracker.ceph.com/issues/45032 Signed-off-by: Matthew Oliver <moliver@suse.com>
3 tasks
alfredodeza
approved these changes
May 28, 2020
sebastian-philipp
pushed a commit
to sebastian-philipp/ceph
that referenced
this pull request
Jun 2, 2020
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] alfredodeza/remoto#56 Fixes: https://tracker.ceph.com/issues/45627 Fixes: https://tracker.ceph.com/issues/45032 Signed-off-by: Matthew Oliver <moliver@suse.com> (cherry picked from commit afabf82)
ideepika
pushed a commit
to ceph/ceph-ci
that referenced
this pull request
Jun 4, 2020
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] alfredodeza/remoto#56 Fixes: https://tracker.ceph.com/issues/45627 Fixes: https://tracker.ceph.com/issues/45032 Signed-off-by: Matthew Oliver <moliver@suse.com>
|
Thanks Alfredo! |
ideepika
pushed a commit
to ceph/ceph-ci
that referenced
this pull request
Sep 3, 2020
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] alfredodeza/remoto#56 Fixes: https://tracker.ceph.com/issues/45627 Fixes: https://tracker.ceph.com/issues/45032 Signed-off-by: Matthew Oliver <moliver@suse.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If the other end of a connection dies it would be good to have a way to
check if it's still alive without having to send a command and catch an
error.
This patch adds a
has_connectionmethod toBaseConnection. We wantto use it in the ceph orchestrator to be able to check the state of the
connection for longer lived health checks.
Signed-off-by: Matthew Oliver moliver@suse.com