-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Split the binary into two: client and daemon #20639
Conversation
5ce28fb
to
a1ed9ad
Compare
@mikedougherty @dnephin @mebersol @tiborvass @icecrime This will have an impact to at least the Windows to Windows Jenkins CI script, and I think likely the Windows to Linux Jenkins CI script. Also the deployment scripts on Windows. I have to ask - what is the value of doing this? Is there an issue having a single binary? Or a specific goal being addressed by this change? |
@jhowardmsft overall I understand it to be splitting two programs that do vastly different things. I like the idea of it. Of course there will be a transition period :) but this looks worth it to me. (this is an argument for running the CI scripts from the revision the code is from but that raises potential security issues) |
Also see #20362 for the roadmap issue |
OK, I a little looking to see what it would take to convert the CI scripts to run on Windows TP4 in this world, and continue to run before this gets merged. First issue is the name of the daemon binary. The way Windows CI works is it starts the daemon under test with the name docker-gitcommitid.exe. When the script goes through its clear-down for reliability, it looks for any processes matching |
I think the name is still very flexible, so this is possible. I'd like to hear other opinions on naming before making any changes, to try and reduce the number of times I rename it.
That sounds ... aggressive. Why doesn't it just track the pids of the daemons that get started, and just kill the specific processes that it needs to kill? |
@dnephin - Yes, aggressive, but what it takes to keep windowsTP4 reliable with the current set of issues. (Should add in the context of this, it won't necessarily know PIDs what was running previously, hence the arbitrary nuking of processes and much else) |
3cee02d
to
e6394a6
Compare
@icecrime Who's the 'test this' comment addressed to? |
@jhowardmsft "test this please" is the magic sentence to trigger the rebuild of the "documentation" job. Very much not confusing, right? 😆 |
Oh, THAT's how you retrigger documentation! 👿 |
e6394a6
to
935209e
Compare
As far as design goes, this makes sense to me so +1. |
@tiborvass While it might 'feel more natural that way' to Linux users, it's pretty alien to Windows users... |
I prefer |
...and |
Perhaps the daemon should just be called |
@thaJeztah It's the |
Ping @dnephin let me know if you want us to carry it if you're not available. |
Signed-off-by: Daniel Nephin <[email protected]>
I don't really have a good way to test out these windows only changes right now, but I pushed what I think is a fix. |
It got past unit tests on Windows with that update. LGTM if full CI passes |
the failed test on windowsTP5 is unrelated to this PR
Possibly related to #22042 |
Yes, agreed. Merging. |
Thanks ! |
Fixes #20362
./client
is a new directory for thedocker
binary (aka the client)./docker
is the old directory which builds thedocker-daemon
binary (aka the daemon)docker daemon
is supported from the client by exec-ing thedocker-daemon
binary with the same args.Notes:
PostProcess()
of CommonFlags could use some cleanup, but I'd like to wait for another branch since it's not required for this change. For now I've used a closure.docker daemon
will execdocker-daemon
usingexec.LookPath()
to find it. It does not assume they are in the same directory.docker-daemon
. This means that a call likedocker --graph=... daemon --bip ...
will actually work. The logic to prevent that would be non-trivial, so I feel like it's better to just allow this. There's very little reason to prevent it now, since the flags ondocker-daemon
are a combination of both the common flags and daemon flags, they need to be unique anyway.dynbinary
builds both the client and the daemon, and the deb and rpm packages include both binaries.Questions:
docker-daemon
the right name for the daemon binary? (another suggestion isdockerd
which would make things easier for the windows build).