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
Refactor listener closing code #2112
Conversation
Reuse logic from Binder#parse.
09d638d
to
cfc7b0f
Compare
Remove Binder#close_unix_paths
cfc7b0f
to
493b3f5
Compare
Confirmed test fails on master 👍 |
Actually, Actions can't download the Ruby binary, although all of the Ruby binaries are downloaded on install.. Both the Ubuntu & macOS files come from the same place, https://github.com/ruby/ruby-dev-builder/releases. Why it can retrieve the macOS fine, but not Ubuntu is odd. The code used is standard GitHub code, it may not have any retry code, I'm not sure... |
@MSP-Greg sorry, I meant I did a checkout on that test locally against the master branch, and it fails on master branch |
This may have broken the 2.2 build though, ugh. |
2.2 on Travis will be the death of me, I'm sure. |
Don't know if I mentioned it, but 2.2 was left out of Actions CI because... See https://bugs.ruby-lang.org/issues/13239 It was not backported to 2.2. Maybe it's time? |
JFYI, I added two 'unless <io>.closed?' statements, and Actions Ruby 2.2 was failing on:
|
Description
This PR fixes a bug/issue where a Unix socket created for a control server (e.g.,
--control-url unix://control.sock
) was not being properly removed on server shutdown.This fix has two parts:
Binder#parse
adds its urls to@listeners
allowing them to be automatically cleaned up byBinder#close_listeners
when the server shuts down, and the code path setting up the control-server listeners was not adding its urls to this array. Simplify Runner#start_control URL parsing #2111 (which this PR extends) fixes this part by simplifying the control-server code to callBinder#parse
instead.close_binder_listeners
to always close the control listeners as well.I've modified the pumactl integration tests to ensure the unix paths are cleaned up after getting shutdown by
halt
andstop
commands. (Both tests fail without the fix in this PR.)Finally, for related cleanup the call to
@binder.close_unix_paths
on launcher shutdown was no longer needed (because closing listeners is handled more consistently by calls toclose_binder_listeners
). I've removed this method to simplify the interface.Your checklist for this pull request
[changelog skip]
the pull request title.[ci skip]
to the title of the PR.#issue
" to the PR description or my commit messages.