Add functional support for Docker sub commands on Solaris#28056
Add functional support for Docker sub commands on Solaris#28056tiborvass merged 1 commit intomoby:masterfrom LK4D4:solaris_me
Conversation
|
@amitkris would you mind to try before merge? |
|
@LK4D4 : Thank you so much for doing this! |
|
@thaJeztah thanks! @LK4D4 : There were two things that need to be modified for the above changeset to work on Solaris. Again in #27912 there is a difference in the version number of the fsnotify package that was previously in hack/vendor.sh and that was added in vendor.conf With these two changes this changeset builds and runs on Solaris as expected. Thank you once again for helping me out with this rebase! |
|
@amitkris actually AUTO_GOPATH should work. vendor directory is no more "gopath" on itself. |
|
@amitkris updated fsnotify. Now we need to figure out stuff with AUTO_GOPATH. Pls ping me in IRC if you have time |
|
Sorted out all outstanding issues with @LK4D4 offline. |
|
@mlaventure has some concerns about this. |
daemon/cluster/listen_addr.go
Outdated
There was a problem hiding this comment.
I'd rather have listSystemIPs() be in a platform specific file than making use of runtime.GOOS.
There was a problem hiding this comment.
It's a copy of the version in container_operations_unix.go, could it be moved to a common files to avoid duplications? We'd definitely forget to update the solaris version if we ever had to make changes to this routine.
There was a problem hiding this comment.
The only difference here is the lack of call to mount.MakeRPrivate could we just have a stub for solaris in pkg/mount/sharedsubtree_solaris.go?
edit: And I just saw that this file actually exists :)
daemon/daemon_solaris.go
Outdated
daemon/daemon_solaris.go
Outdated
daemon/start.go
Outdated
daemon/start.go
Outdated
There was a problem hiding this comment.
Currently on Linux this just fails when we try to actually run the image, wouldn't the same happen on Solaris?
Also, this probably make more sense in the containerCreate side of things, might as well fails as early as possible
libcontainerd/client_solaris.go
Outdated
There was a problem hiding this comment.
defer should be just after the Lock
libcontainerd/remote_unix.go
Outdated
There was a problem hiding this comment.
runtime == runc? I thought it was named runz? :)
Also this can be removed, if the user specify an invalid runtime this will fails and that's the expected behavior.
There was a problem hiding this comment.
same as above. For maximum reutilization of common code and due to the stockRuntimeName issues we're sticking to runc in the engine for Soalris.
libcontainerd/remote_unix.go
Outdated
There was a problem hiding this comment.
nit: I usually prefer having a dedicated file with a stub than checking GOOS. Easier to maintain and expand IMHO.
|
In which case the code can stay unmodified. If the user explicitly specify a non compatible runtime, it's up to him to On Fri, Nov 4, 2016 at 3:08 PM Amit Krishnan [email protected]
|
|
I've fixed some nits, but splitting to files is still problematic for me. Because solaris uses many functions from |
hack/make/test-unit
Outdated
There was a problem hiding this comment.
@amitkris shouldn't we hide tests behind tag? This really looks bad.
There was a problem hiding this comment.
@LK4D4: My only intention there was to get daemon/graphdriver tests to not run for Solaris. We support only zfs and running the other graph plugins doesn't make sense.
With my limited understanding of hack/make/test-unit this seemed to be the simplest way to do it.
Any logic that would help accomplish this better is fine.
There was a problem hiding this comment.
@amitkris let me know which tests fail for you. They all should be behind linux tag.
There was a problem hiding this comment.
@LK4D4 : everything in graphdriver except zfs fails for Solaris.
There was a problem hiding this comment.
@amitkris What the errors? All graphdrivers behind linux build tag.
There was a problem hiding this comment.
@LK4D4 : sorry misunderstood your question the first time. The issue is with graphtest/graphtest_unix.go. Enabling that for Solaris calls into devmapper for some reason and that fails and then terminates the entire test run. Please remove the Solaris build tag from graphtest_unix.go for now. I will investigate and fix that in a follow up.
Once the solaris build tag is removed frm that file hack/make/test-unit can go back to the way it was.
There was a problem hiding this comment.
Thanks for explanation.
hack/make/tgz
Outdated
There was a problem hiding this comment.
@LK4D4 : The libnetwork changes that I vendored in with my original PR were being called only from Solaris files. This caused an issue with the vendor CI which being run on a linux box did not detect the dependencies in use by Solaris files.
To fix this I added the solaris/amd64 tag in vendor. As a result of this make/cross tried to build Solaris binaries and failed due to the CGO calls which call into Solaris specific header files.
So to make the vendor CI and make/cross pass we added bypassed the cross build for Solaris with the above elif continue.
|
Also, I've rebased on master. So, now changes are way smaller. |
|
It doesn't build |
|
By the way it's common problem with files. You can find examples of duplication in |
|
I'll open an issue for tracking the deduplication as far as Solaris is concerned then so this can be moved along. |
|
@mlaventure btw, I think I've fixed duplication issues which you mentioned. |
Signed-off-by: Amit Krishnan <[email protected]> Signed-off-by: Alexander Morozov <[email protected]>
|
LGTM |
|
thank you @LK4D4 @thaJeztah @mlaventure @tiborvass! :D |
This is the carry of #23397 to free @amitkris from hell of a rebase. That PR was in merged state, so we can merge this when CI will pass.
Closes #23397