Skip to content

vpnkit-forwarder: avoid -data-connect spinning#563

Merged
djs55 merged 4 commits intomoby:masterfrom
djs55:avoid-connect-spinning
Mar 15, 2022
Merged

vpnkit-forwarder: avoid -data-connect spinning#563
djs55 merged 4 commits intomoby:masterfrom
djs55:avoid-connect-spinning

Conversation

@djs55
Copy link
Copy Markdown
Collaborator

@djs55 djs55 commented Mar 14, 2022

Previously if -data-connect was connecting to a port forward and the remote isn't running, it would connect but then get an immediate EOF. Unfortunately it would try again and spin in a tight loop. This is likely to happen when shutting down, as the remote can stop before the port forward closes.

This patch adds a one second delay to break the spinning and a log every 30s to highlight any persistent problem.

djs55 added 4 commits March 14, 2022 11:43
There is currently no initial handshake to check whether the remote
is actually there, so we can connect() successfully but then immediately
read an EOF in some cases (e.g. port forwarding when the server isn't
running). Previously we would spin in a tight loop. This patch adds
a log and a 1s delay to avoid spinning.

Signed-off-by: David Scott <dave@recoil.org>
Signed-off-by: David Scott <dave@recoil.org>
Signed-off-by: David Scott <dave@recoil.org>
Signed-off-by: David Scott <dave@recoil.org>
Copy link
Copy Markdown
Contributor

@mat007 mat007 left a comment

Choose a reason for hiding this comment

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

Makes sense!

|} ^ isc
}
| "functoria-runtime.3.0.3" -> {
| "functoria-runtime.3.0.3" | "functoria-runtime.3.1.2" -> {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(curious)
How do you notice the licenses need to be updated? How do you do the update?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It's not a great system. The appveyor build fails and gives me a list, mostly consisting of new minor versions. I manually take a look to verify that they haven't changed. 99.99% of the time nothing changes so it's a bit tedious. It would be nice to automate it a bit more. In my ideal world I would just review any changed license text.

Maybe if I had a tool which could go from github tag link -> license data I could use it to update a checked-in cache of licenses.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe if I had a tool which could go from github tag link -> license data I could use it to update a checked-in cache of licenses.

Oh, I do have that elsewhere!
I can extract a command from it, what would you need? Would that work for instance:

./pinata.sh license info https://github.com/bla/blo

?

@djs55 djs55 merged commit 922231e into moby:master Mar 15, 2022
@djs55 djs55 deleted the avoid-connect-spinning branch March 15, 2022 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants