-
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
Adding support for memory swap settings for services #37872
base: master
Are you sure you want to change the base?
Conversation
Let's be careful about how we expose these settings. |
24dcec3
to
79035b9
Compare
Please sign your commits following these rules: $ git clone -b "wk8/memory_flags_for_swarm" git@github.com:wk8/moby.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354426360
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. |
79035b9
to
6e825ea
Compare
478cc07
to
1a29d63
Compare
bf27614
to
d7c123b
Compare
b03fc60
to
a3ecf6e
Compare
a3ecf6e
to
7d740c0
Compare
7d740c0
to
7a1f141
Compare
7a1f141
to
1aa7385
Compare
1aa7385
to
2a6f9ea
Compare
2a6f9ea
to
2cb44ac
Compare
2cb44ac
to
4a05d9b
Compare
integration/service/create_test.go
Outdated
// verify that the container has the swap option set | ||
ctnr, err := client.ContainerInspect(ctx, task.Status.ContainerStatus.ContainerID) | ||
assert.NilError(t, err) | ||
//assert.DeepEqual(t, ctnr.HostConfig.MemorySwap, swap) |
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.
@anshulpundir that's the failing test. No timing issue at all :( it's set to -1 when failing...
4a05d9b
to
f744db0
Compare
As per our discussion today with @thaJeztah & @cpuguy83 :
|
relevant changes: - swarmkit#2815 Extension and resource API declarations - swarmkit#2816 Moving swap options into `ResourceRequirements` instead of `ContainerSpec`s - relates to moby#37872 - swarmkit#2821 allocator: use a map for network-IDs to prevent O(n2) - swarmkit#2832 [api] Add created object to return types for extension and resource create apis - swarmkit#2831 [controlapi] Extension api implementation - swarmkit#2835 Resource controlapi Implemetation - swarmkit#2802 Use custom gRPC dialer to override default proxy dialer - addresses moby#35395 Swarm worker cannot connect to master if proxy is configured - addresses moby#issues/36951 Swarm nodes cannot join as masters if http proxy is set - relates to swarmkit#2419 Provide custom gRPC dialer to override default proxy dialer Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Hopefully the last one :) As per moby/moby#37872 (comment) Signed-off-by: Jean Rouge <rougej+github@gmail.com>
@thaJeztah & @cpuguy83 : before I do the changes outlined in #37872 (comment), could you please validate that https://github.com/docker/swarmkit/pull/2865/files#diff-2825f8c43cd6822a89834c265124fe46 looks good to you, and that this shape for the Limits/Resources structs should be the final one, and won't need to be changed another time? Thanks. |
25a29c4
to
ee3144f
Compare
b709d06
to
05eb1d6
Compare
Signed-off-by: Jean Rouge <rougej+github@gmail.com>
05eb1d6
to
02e3d3c
Compare
Is this ready to merge? |
Any update on this one? |
Hi, is this still being worked on? |
Any progress here? |
Hi, just wondering if this PR is still in progress as it would be useful to be able to deactivate swapping in swarm mode ? |
Any update? |
Still not possible to deactivate swap ? |
Any update? |
Anybody still out here....? |
Is anything happening with this? |
Has there been any further traction on this? |
- What I did
Adds support for memory swap options in services. That includes the API
plumbing, reflected in the API's doc. Added unit tests on the new feature.
- How I did it
Adds 2 new fields to service container specs, equivalent to
docker run
's--memory-swap
and--memory-swappiness
.- How to verify it
Includes integration tests.
- Related issues
#34654
- Description for the changelog
Adds support for memory swap options in services.