Retry client connection in waitForStart#7537
Conversation
|
Hi @swagatbora90. Thanks for your PR. I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
| client, err = New(d.addr) | ||
| if err != nil { | ||
| continue | ||
| } |
There was a problem hiding this comment.
Haven't looked closely in the whole code, but this one felt a bit odd; is it needed to create a new client in the loop (so construct a new client for every request)?
There was a problem hiding this comment.
Creating a new client can sometimes fast fail, as we saw in here #7422. This change addresses that by retrying the client connection on failure at least until the context deadline has exceeded.
There was a problem hiding this comment.
Does that mean that New(d.addr) already makes a connection? That is a bit surprising (I wouldn't immediately expect that constructing a client requires a connection); if that's the case, I feel like that's something we need to look into.
There was a problem hiding this comment.
Yes,New() makes a connection to the containerd instance at the given address
Lines 142 to 155 in 9cd3357
kzys
left a comment
There was a problem hiding this comment.
Looks good to me. Can you rebase this branch? I have made some reporting fixes in the main branch. So rebasing will bring them to this PR.
|
/ok-to-test |
Signed-off-by: Swagat Bora <[email protected]>
d3d2fe8 to
727b33c
Compare
|
/retest |
|
|
|
/retest |
|
@thaJeztah @samuelkarp Can you take a look? The tests are all green. |
Issue: #7422
waitForStartSigned-off-by: Swagat Bora [email protected]