Giter VIP home page Giter VIP logo

Comments (9)

thaJeztah avatar thaJeztah commented on August 17, 2024

is the service configured "stop-first" or "start-first"?

from classicswarm.

sebastianfelipe avatar sebastianfelipe commented on August 17, 2024

is the service configured "stop-first" or "start-first"?

Everything is stop-first

Screenshot 2020-04-06 16 21 28

from classicswarm.

olljanat avatar olljanat commented on August 17, 2024

@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 avatar sebastianfelipe commented on August 17, 2024

@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.

sebastianfelipe avatar sebastianfelipe commented on August 17, 2024

Adding to this, it is a service with stop-first, so in theory, the max_replicas_per_node, should work.

from classicswarm.

olljanat avatar olljanat commented on August 17, 2024

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.

sebastianfelipe avatar sebastianfelipe commented on August 17, 2024

@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.

olljanat avatar olljanat commented on August 17, 2024

@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.

justincormack avatar justincormack commented on August 17, 2024

This repo is not for Docker swarm you are looking for https://github.com/docker/swarmkit

from classicswarm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.