-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add maximum replicas per node support to stack version 3.8 #1410
Conversation
b1658da
to
e96bae0
Compare
Codecov Report
@@ Coverage Diff @@
## master #1410 +/- ##
=========================================
- Coverage 56.12% 55.32% -0.8%
=========================================
Files 306 283 -23
Lines 20964 19331 -1633
=========================================
- Hits 11766 10695 -1071
+ Misses 8345 7939 -406
+ Partials 853 697 -156 |
e96bae0
to
b04df64
Compare
Please sign your commits following these rules: $ git clone -b "replicas-max-per-node" [email protected]:olljanat/cli.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354053072
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. |
b04df64
to
c5959f8
Compare
eac151b
to
7e61cf1
Compare
@vdemeester @thaJeztah Rebased to latest state of master. I think that it would be nice to have first review round and I really would have use to good ideas why max replicas value is not read from stack file. |
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.
left some comment, but I'll have to dig into the compose issue as well
ping @vdemeester any clues?
Oh, sorry, I probably didn't describe #1410 (comment) properly What I meant is; include the new schema in this PR, but split it in two; similar to;
Both of the above are part of the same PR (#426), but having |
36da368
to
5d3b3fe
Compare
@thaJeztah ahaa. No worries. Updated 😉 |
Signed-off-by: Olli Janatuinen <[email protected]>
5d3b3fe
to
85406d1
Compare
Signed-off-by: Olli Janatuinen <[email protected]>
bbf6663
to
6347ab3
Compare
Now this works correctly. |
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 thank you @olljanat and sorry for the delay!
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, thanks!
did a quick check if the latest schema changes in the 3.7 schema (#1657) were copied to the 3.8 format, and all looks well;
--- cli/compose/schema/data/config_schema_v3.7.json 2019-02-20 13:09:49.000000000 +0100
+++ cli/compose/schema/data/config_schema_v3.8.json 2019-02-20 13:09:49.000000000 +0100
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
- "id": "config_schema_v3.7.json",
+ "id": "config_schema_v3.8.json",
"type": "object",
"required": ["version"],
@@ -424,7 +424,8 @@
},
"additionalProperties": false
}
- }
+ },
+ "max_replicas_per_node": {"type": "integer"}
},
"additionalProperties": false
}
So what's remaining after this;
|
Which version of docker should I be using to have this supported? Currently I'm using the following version but it's not working for me
|
@zcaudate because you are listing docker compose version here it sounds that you are understood something wrong. This feature works only with |
I might be missing something but docker stack deploy takes a docker-compose file doesn’t it?
I included the version just to make sure that there wasn’t a compatibility issue with swarm and docker compose.
… On 24-May-2020, at 4:11 PM, Olli Janatuinen ***@***.***> wrote:
@zcaudate because you are listing docker compose version here it sounds that you are understood something wrong. This feature works only with docker stack deploy command on Swarm mode. Not with docker-compose.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@zcaudate Yea syntax which stack deploy uses have is based docker-compose but those works differently (for example docker-compose totally ignores deploy section from file).. However, if you do not get it working then please create new issue to https://github.com/moby/moby/issues with all asked details. |
- What I did
Added support for maximum replicas per node to
docker stack deploy
Fourth step to be able solve:
- How I did it
Added new schema 3.8 version including max_replicas_per_node setting
- How to verify it
Use stack like this:
NOTE! Max replicas value from stack file does not work yet. More details in below.
- Description for the changelog
TODO: