GithubHelp home page GithubHelp logo

Comments (7)

Typositoire avatar Typositoire commented on July 3, 2024

I had to manually delete the PDB and recreate it as you can't update a PDB.

from consul-helm.

adilyse avatar adilyse commented on July 3, 2024

@Typositoire In this case, this is the expected behavior. It is recommended to run with 3-5 Consul servers, so this calculation gives the desired value of 0 allowed voluntary disruptions with 3 server replicas.

As for the calculation itself, the behavior is a bit unintuitive since it's using integer division, which evaluations 3/2 as 1. We've accounted for this, though, so the calculation is correct.

Hopefully that answers your question!

from consul-helm.

Typositoire avatar Typositoire commented on July 3, 2024

The problem happens during rolling upgrades.

Given 3 nodes with 1 consul-server each. I can never upgrade gracefully as this would go against the PDB (node drain). In a setup with KOPS this is what is happening and this is annoying.

With 3 nodes you can survive a 1 node failure, I'm not sure why you force it to be 0.

from consul-helm.

Typositoire avatar Typositoire commented on July 3, 2024
I1204 14:49:44.381510   13119 request.go:874] Response Body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"Cannot evict pod as it would violate the pod's disruption budget.","reason":"TooManyRequests","details":{"causes":[{"reason":"DisruptionBudget","message":"The disruption budget consul-server needs 3 healthy pods and has 3 currently"}]},"code":429}
I1204 14:49:49.382064   13119 request.go:874] Request Body: {"kind":"Eviction","apiVersion":"policy/v1beta1","metadata":{"name":"consul-server-1","namespace":"consul","creationTimestamp":null},"deleteOptions":{}}

from consul-helm.

adilyse avatar adilyse commented on July 3, 2024

Thank you for the additional information! I'll do some more digging and see what we can do about this.

from consul-helm.

s3than avatar s3than commented on July 3, 2024

@adilyse I've been chasing this issue up today as well, It appears that the sprig library doesn't currently support floats so what happens is the following

3/2 = 1
1-1 = 0
ceil(0) = 0

My current fix is as below, I can put together a pull request and update tests for you hopefully this evening.
{{- define "consul.pdb.maxUnavailable" -}} {{- if eq (int .Values.server.replicas) 1 -}} {{ 0 }} {{- else if .Values.server.disruptionBudget.maxUnavailable -}} {{ .Values.server.disruptionBudget.maxUnavailable -}} {{- else -}} {{- div (sub (div (mul (int .Values.server.replicas) 10) 2) 1) 10 -}} {{- end -}} {{- end -}}

from consul-helm.

s3than avatar s3than commented on July 3, 2024

@adilyse Hopefully this solves this issue I implemented something different for the calculations and provided tests.

Any problems let me know

from consul-helm.

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.