-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Add support for capabilities options in services #39173
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
Conversation
8da9a5c
to
a713a3a
Compare
Codecov Report
@@ Coverage Diff @@
## master #39173 +/- ##
=========================================
Coverage ? 37.05%
=========================================
Files ? 612
Lines ? 45484
Branches ? 0
=========================================
Hits ? 16852
Misses ? 26347
Partials ? 2285 |
(reserved for my derek commands) |
997afe0
to
961325c
Compare
Please sign your commits following these rules: $ git clone -b "25885-capabilities-swarm" git@github.com:olljanat/moby.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354127376
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f Amending updates the existing PR. You DO NOT need to open a new one. |
961325c
to
95cce8a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Left some comments inline 🤗
cc2c9f3
to
587aef5
Compare
Signed-off-by: Olli Janatuinen <olli.janatuinen@gmail.com>
587aef5
to
f787b23
Compare
@thaJeztah rebased and updated based on your comments. Janky should pass after #39277 is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
How would you use this from a compose-file that you pushed at a swarm using "docker stack deploy" ? |
Compose file changes are not yet implemented, but you'd specify the list of capabilities that a service should get |
Yea. That part probably needs still some discussion and actual implementation after that. For example if we will actually support "--privileged" switch like requested on moby/swarmkit#1030 and #24862 or will we up force user to specify exact list of capabilities? (it will be still possible to specify all the capabilities so it more about how we want to implement user interface). |
uggg this question has no business here ... but how do I get this build for testing on Ubuntu 16.04 ... cause for now I'll write a script that I push into my swarm nodes and "Update capabilities using curl" like your example above ... |
You can compile a static binary with Otherwise wait for this to be merged, and it should appear as a nightly build on download.docker.com |
Cool ... I cloned https://github.com/olljanat/moby.git ... and it built. Since you approved the change does this mean this change gets merged tonight and show up in tonights nightly build ? ... and seriously this goes without saying : you know you're one of the most helpful people this industry has ever seen even when the answer is not what people want to hear. Thank you. |
You make me blush! All credits for this one really go to @olljanat! We generally want two maintainers to review and give their LGTM before we merge; to be sure that a reviewer didn't miss anything (we're human 😁). That said; anyone can help (and is more than welcome) to review PRs (more eyes never hurt) This PR is fairly straightforward, so once another maintainer finds time to review, I expect it to be merged soon |
FYI ... I tried it out. I couldn't use it for what I was hoping to solve (using mongo with cifs remote storage). Azure just added NFS today so maybe that's an option but not sure the best driver to use for that. BUT I did test it this PR (created a swarm with one service) and I do see the capabilities returned in the JSON. 👍 The credit does go to @olljanat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
- What I did
Add support for capabilities options in services
Third step to address #25885 , #24862 and moby/swarmkit#1030
- How I did it
- How to verify it
Create service with command:
Check log with command:
docker logs <container id>
which should print capabilities from inside of container.Update capabilities
Reset to default capabilities:
- A picture of a cute animal (not mandatory but encouraged)
