Comments (9)
is the service configured "stop-first" or "start-first"?
from classicswarm.
is the service configured "stop-first" or "start-first"?
Everything is stop-first
from classicswarm.
@sebastianfelipe I would say that it is by design.
You should either:
- reduce number of replicas to 4
- add one more worker so there is always one spare worker.
- schedule maintenance work on time when there is no updates on-going.
from classicswarm.
@sebastianfelipe I would say that it is by design.
You should either:
- reduce number of replicas to 4
- add one more worker so there is always one spare worker.
- schedule maintenance work on time when there is no updates on-going.
It cannot be like that, because:
- if I reduce the number of replicas to 4, it is 2/2 and 2/2 in each worker, so the case is the same
- add one more worker -> cost
- It needs to work with CI/CD effectively, no applying some patch to a bad behaviour that's not clean to me, there's a stack with more than 10 services, so in each docker compose change I'll have to patch everything and that is not what I'm looking for. If I have 6 replicas running and I decrease to 3, what will happen with the performance? Is it necessary to have in mind that the solution cannot be on my hand, it is necessary that every change still working without major problem.
from classicswarm.
Adding to this, it is a service with stop-first, so in theory, the max_replicas_per_node, should work.
from classicswarm.
Well this kind of use case didn't came to my mind when I implemented max replicas feature. We use it just make sure that all replicas do not get scheduled to one worker when another one goes down e.g. in case of virtualization platform crash, network failure or node reboot.
So this need to be handled on swarmkit side on way that someone implements test case which handles this situation and then modify logic to handle it correctly.
PS. IMO patching existing workers is very old skool approach. If you create flow which first add new already patched worker to swarm and then drop old one you will not see this issue.
from classicswarm.
@olljanat thanks for answering. I didn't understand, so you're saying that you thought in the case a VM is down, so what did happen here? Because I turned off definitely a VM and then appears that error, so the question is, why is it pretending to deploy services on down hosts? Maybe I didn't understand your point very well :/
from classicswarm.
@sebastianfelipe I mean if you deploy service with two replicas to swarm where is two workers both of them will run one replica. If you now reboot one of those workers then swarm will notice that there is only one running replica service and schedule second replica running on that only available worker so end result is that one worker have two replicas of service running and second worker have zero replicas.
Only way to fix that without max replicas is scale all services to 1 and back to 2 after worker reboot. Other why you end up situation where you application is not anymore fault tolerant for worker crash (if worker which have all replicas goes down then whole application is down until swarm re-start new replicas to another worker).
Btw. You see how this was implemented and which kind of tests was included from moby/swarmkit#2758 and that it what is needed to enhance to handle your use case correctly.
from classicswarm.
This repo is not for Docker swarm you are looking for https://github.com/docker/swarmkit
from classicswarm.
Related Issues (20)
- wrong ip to node HOT 1
- How to set the unique environments for tasks on every node in docker swarm? HOT 1
- Concerns about future HOT 15
- Docker: Unable to ping another host from inside of container running in swarm HOT 3
- Help: Network Alias HOT 1
- Feature Suggestion: docker swarm <stack-name> logs should provide aggregated logs from all services HOT 1
- Ingress routing broke after service update with start first HOT 1
- Pull request validation fails, https://jenkins.dockerproject.org not available HOT 1
- Bind Volumes mess up with users and groups... HOT 8
- Please help me ....................................What is alternative method to get discover token for docker-machine swarm ????? HOT 1
- CI: replace custom "dockerswarm/dind" image with official docker:dind image
- Plans on IPv6 support in swarm HOT 1
- docker swarm manager doesn't join on proper ip:port HOT 1
- Port redirection not working with docker swarm HOT 1
- How to access private repos of docker hub? HOT 1
- Grafana v6.6.3 does not work on dockerswarm HOT 1
- service creation failing HOT 1
- Can nodes in a swarm have different versions of docker-ce ? HOT 1
- Why have all issues been closed? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from classicswarm.