-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
Create extpoint for graphdrivers #13777
Conversation
testcases? |
c12e02f
to
2aaed2c
Compare
Yeah, tests are coming. One issue is it seems that if I use the vfs driver for the "remote" driver, it gets frozen when it hits |
2aaed2c
to
3065c69
Compare
Thoughts? |
cc436e2
to
dff7c14
Compare
@cpuguy83 What are the use cases for this? I don't feel we have a need for this right now (it's not like we get dozens of PR about adding graphdriver that we refuse because we don't want them compiled in), so I'm a weak no. |
we've already had requests for gluster and ceph... Ceph being one that can't be linked statically either. Also consider drivers for enterprise storage devices like NetApp, EMC, and I could name a few others that would prefer not to be named. |
@icecrime Please allow me to explain why this would be useful and why my vote would be an aye. You've said that we don't get many PRs for adding new graph drivers and that this might not be needed now. While I do agree that we don't receive many PRs for new graph drivers, we also need to think about the reasons. Companies like EMC, NetApp and others will most likely not be sending pull requests to add their product specific graph driver to the Docker repository. That can be because of a multitude of reasons: they want to keep it closed source, they want to put some proprietary stuff in there, they'd want to be able to change it, update it separately from Docker releases and so on. The Ceph driver has been requested before and I've also rejected that idea because we'd have to tie it into Docker by linking to Ceph libraries which are version specific. The last thing we need is to link against more foreign C/C++ libraries and produce multiple Docker binaries for all those systems with all the different Ceph versions. It's obvious that we won't get a Ceph PR because we've turned it down for these reasons, so Ceph support can't happen without plugin support for graph drivers. These graph driver plugins could live in a separate repository and they could be packaged separately from Docker. The Ceph graph driver would probably be the first one. @cpuguy83 Perhaps making the necessary changes to allow custom Diff implementations would be a good idea. I also anticipate some changes in the graph driver API and having some kind of versions for this API would certainly help with that. |
Sorry, I missed the comment here. I see, makes sense then. |
@hustcat Really cool! Could I recommend to change your default graph store dir to not be |
Yea,Thanks for your suggestion. I will continue to improve it:) |
@hustcat are you still working on this? |
Sorry, wrong ping, GitHub autocomplete... meant to type @cpuguy83 😊 |
This is in design review. |
Doh! Looks like I'm not having my day, LOL, should not be doing late-night browsing through issues 😉 |
Brian, I'd like to use your implementation of graphdriver extpoint to resolve issues I attempted to solve by #15594, but this would require a minor improvement of what you have done -- it would be great not to loose the knowledge of "home" and "options" that GetDriver() has as arguments. For example, we could implement mux.HandleFunc("/Plugin.Init", ...) and call it from LookupExtPoint() after plugins.Get(). What do you think? |
@mpatlasov This would make sense if Docker is going to initialize the plugin, but if the plugin is already running, it really shouldn't be doing this, and also is a bit weird in cases where maybe this is a multi-host solution. |
8eda9b2
to
46bca86
Compare
Ok, this is now fully functional, figured out the issue with chrootarchive in test. In writing this, I noticed that there is no code path that actually calls |
204e906
to
c9d6d3a
Compare
Allows people to create out-of-process graphdrivers that can be used with Docker. Extensions must be started before Docker otherwise Docker will fail to start. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
c9d6d3a
to
b78e421
Compare
Does anyone think we should have a versioning system for this API? This graphdriver plugins API will most likely get improved once people start building graph drivers and that means we'll have to version it. |
@unclejack Right now the overall plugin API is bumped when there are changes to anything, and we don't stay backwards compatible. |
We can change the content type to be specific about the API endpoint. We already have a version number there. We don't need another versioning system. |
Is there something that should change in this PR? |
Sorry for the noise, but is this going to be merged or not? Is there anything I can help with? |
@kolyshkin Yup, thanks for ping. |
LGTM |
docs LGTM |
@cpuguy83 LGTM -- just an FYI I generally don't review experimental until we move it into the |
ping @docker/core-maintainers |
ok LGTM, shall we fire ze missiles on this one |
Create extpoint for graphdrivers
@cpuguy83 is there any ability to pass options to the external graph driver? with the volume driver, you can pass in volume specific options that can be used by the driver to customize behavior.. i think that would be awesome to have here as well. |
@mx2323 No, the graphdriver is not user-facing. |
@cpuguy83 thanks for the quick reply. sounds like it probably wouldn't be that hard to add. i can look into doing it and sending a diff out... thnx |
Allows people to create out-of-process graphdrivers that can be used
with Docker.
Extensions must be started before Docker otherwise Docker will fail to
start.
For simplicity, uses in-process NaiveDiffDriver for diffing.