Add functional support for Docker sub commands on Solaris#23397
Add functional support for Docker sub commands on Solaris#23397amitkris wants to merge 4 commits intomoby:masterfrom
Conversation
49e2401 to
bd8a403
Compare
|
The CI is complaining about some Go linting issues, might be good to clean up. |
|
eaceb51 to
d9700d8
Compare
|
ping @amitkris can you rebase? 1.12 is released, so we can begin moving this forward |
|
@thaJeztah thats great! thanks for the update. will ping here when done. |
8248e41 to
14328d9
Compare
|
ping @thaJeztah : rebased changes, its ready to be reviewed. |
340013d to
0a3df6b
Compare
db9feb6 to
86e14f9
Compare
86e14f9 to
de8eee1
Compare
daemon/config_windows.go
Outdated
There was a problem hiding this comment.
Hmmm. There is no runc on Windows....
There was a problem hiding this comment.
@jhowardmsft : this change was introduced because the stock runtime was being initialized to runc for all platforms and we wanted it to be runz for Solaris. Due to changes that have come about since then this is no longer required, and the logic can go back to what it was.
I'll revert this change.
container/container_notsolaris.go
Outdated
There was a problem hiding this comment.
This only actually builds on Linux, FreeBSD does not have unix.MNT_DETACH, so looks like this should be container_linux and FreeBSD and Solaris can share the other file.
If you don't want to change this, feel free to leave it and I will try to tidy up the mess that is our bitrotted FreeBSD support later...
There was a problem hiding this comment.
I've changed the files to container_linux.go and container_notlinux.go
daemon/cluster/listen_addr.go
Outdated
There was a problem hiding this comment.
this should be split out into a conditionally compiled file ideally
There was a problem hiding this comment.
This was necessitated because the net package isn't fully threshed out on Solaris.
We have to shell out to the CLI in the interim via this function and it will be removed soon.
Since its temporary I thought it would be best to keep it in the common file for now as opposed to making it platform specific and stubbing it out for all the platforms.
I can change it if you feel strongly about it..
There was a problem hiding this comment.
no fine to keep it temporarily
daemon/commit.go
Outdated
There was a problem hiding this comment.
It would be nicer to refactor this as a set of daemon feature flags eg daemon.feature.commitRunning = false and test these rather than OS conditionals, then collect them all together in a per OS file.
There was a problem hiding this comment.
I'm not sure thats required for one feature?
A multi-platform check such as this is done only in this file (all others are in test files and not feature specific). If such checks show up for multiple features in the future I'd be happy to implement that. For now I think its simplest this way.
There was a problem hiding this comment.
This is not the only feature, there are more, but happy if we fix later.
As a matter of principle, we should not have references to runtime anywhere. These are static features.
daemon/daemon_solaris.go
Outdated
There was a problem hiding this comment.
Not sure about ignoring these values, I think it might be better to error and fail.
There was a problem hiding this comment.
Thats a good point. Some of the features here have been stubbed pending certain minor changes in Solaris OS code which are being worked upon. Once we have a fully threshed out list of what we're looking to support going forward we will error out on those unsupported.
So until then we'd like to keep it this way.
hack/make/cross
Outdated
There was a problem hiding this comment.
Confusing comment, do you mean "Solaris cannot be cross built"?
There was a problem hiding this comment.
Yes. I've updated the comment.
pkg/archive/archive_test.go
Outdated
There was a problem hiding this comment.
Are you sure? The man page says that would be a 1 byte blocksize! bs=1024 should work for all platforms.
There was a problem hiding this comment.
great catch! thanks! I've updated this as you suggested.
|
@amitkris hi, have looked through this and added some comments. Generally I would be happy if most/all of them were addressed in followup PRs instead and I think it would be ok to merge as is. |
|
@justincormack : Hi! Thank you for the comments :) |
7c28337 to
99c2fa0
Compare
|
@amitkris looks like it needs a rebase |
99c2fa0 to
6a20f74
Compare
|
@thaJeztah : done |
|
thanks @tiborvass ! |
|
oh, @amitkris is going to squash the last commit before merging, so hold your horses 😄 |
Signed-off-by: Amit Krishnan <[email protected]>
|
thanks @justincormack! squashing the topmost changeset now. |
…laris support. This is because the Solaris platform does not support the syscall package. Note that while Solaris supports all the common functionality in sys/unix there are platform specific features (for eg. MNT_DETACH) which are not implemented for the Solaris platform. Signed-off-by: Amit Krishnan <[email protected]>
Signed-off-by: Amit Krishnan <[email protected]>
Signed-off-by: Amit Krishnan <[email protected]>
6a20f74 to
39c0636
Compare
|
Rebased/Carried in #28056 |
|
In that case I'm closing this one. |
This PR will add support for a subset docker sub commands on Solaris.
This PR looks to add support for the following subcommands and explicitly disallow the rest on Solaris.
Supported subcommands:
attach, build, commit, cp, create, diff, events ,export, history, images, import, info, inspect, kill , load, login, logout, logs , network(null and bridge driver only), port, ps, pull, push, rename, restart , rm, rmi, run, save, search, start, stop, tag, top, version, wait
Unsupported commands:
exec, pause, stats, service, unpause, update, volume
TODO:
Signed-off-by: Amit Krishnan [email protected]