Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

net: Added EHOSTUNREACH to retry list #16902

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/v/net/connection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <seastar/core/future.hh>
#include <seastar/net/tls.hh>

#include <asm-generic/errno.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm pretty sure you should only need <errno.h> but the LSP usually doesn't know

#include <gnutls/gnutls.h>

namespace net {
Expand Down Expand Up @@ -53,6 +54,10 @@ bool is_reconnect_error(const std::system_error& e) {
case ECONNABORTED:
case EAGAIN:
case EPIPE:
case EHOSTUNREACH:
Copy link
Member

@BenPope BenPope Mar 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there are any other error codes we could opportunistically add here? E.g.:

  1. ESHUTDOWN
  2. EHOSTDOWN
  3. ENETRESET
  4. ENETDOWN

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ESHUTDOWN is where we shutdown the socket (https://linux.die.net/man/3/shutdown). So probably an artifact of shutting down and not a retry. Thoughts?

I think the other three can be added.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably shut down the socket on all manner of alternative errors. At initial glance, I didn't see an abort source which would be more explicit about shutdown.

case EHOSTDOWN:
case ENETRESET:
case ENETDOWN:
return true;
default:
return false;
Expand Down
Loading