Unify errors returned from ProxyClient when targets are ambiguous#25004
Unify errors returned from ProxyClient when targets are ambiguous#25004rosstimothy merged 1 commit intomasterfrom
Conversation
Ensures that SSH and gRPC connections via `tsh` return the same error when dialing a host fails. Closes #24943
| conn, details, err := c.transport.DialHost(ctx, target, cluster, nil, keyring) | ||
| if err != nil { | ||
| return nil, ClusterDetails{}, trace.Wrap(err) | ||
| return nil, ClusterDetails{}, trace.ConnectionProblem(err, "failed connecting to host %s: %v", target, err) |
There was a problem hiding this comment.
This now matches the error that was returned from the SSH equivalent:
teleport/api/client/proxy/client.go
Lines 635 to 640 in 989d6ee
nklaassen
left a comment
There was a problem hiding this comment.
this seems good, but regarding the linked issue I really don't think we should be attempting relogin for all NotFound errors, we should probably only relogin for specific known errors
The linked issue seems to be more like two issues: 1 being that the gRPC connections broke ambiguous host handling and 2 NotFound triggers a re-login attempt. I'm a bit hesitant to address 2 as I don't have any idea if there is something else relying on that to work. |
|
@rosstimothy See the table below for backport results.
|
Ensures that SSH and gRPC connections via
tshreturn the same error when dialing a host fails.Closes #24943