Giter Club home page Giter Club logo

Comments (3)

enxebre avatar enxebre commented on September 23, 2024 1

@sohrab- thanks for reporting feedback. The machine API is your source of truth for managing machines therefore terminate nodes via console is not recommended. As a workaround for the inconsistent status you have two choices:
1 - To add the machine.openshift.io/exclude-node-draining annotation to the orphan machine so then deletion will go through (this is fixed in new versions so there won't be need to add the annotation)
2 - Manually approve the new generated CSR via kubectl certificate approve so new instance becomes a node. This behaviour is likely to change soon in favour of no new instance being generated for the old machine object. So we encourage to delete corrupted a machines and let the MachineSet to create a new one.

If this is expected, is there any other way to protect against worker loss automatically (self-healing)?

There's a "tech preview" feature "Machine health checking" where you can targets machines that you want to be self-healed and automatically recreated when a problem is detected

from machine-api-operator.

vikaschoudhary16 avatar vikaschoudhary16 commented on September 23, 2024

@sohrab- This a known behavior. Removing machine by deleting the cloud instance is not expected way. Machine should be removed through machineset only.

Now explanation for the behavior:
Newly created instance could not get registered as k8s node. Why? Because csr approver, https://github.com/openshift/cluster-machine-approver, did not approve the csr for the new instance as a security policy. And because it did not become node, machine object was also not updated to point to the new instance.
Why old machine not getting deleted? There is a finalizer on machine which does not let the machine deletion until succesful response from the cloud instance deletion api. In this case, i guess that would be returning an error because you deleted it from console and therefore machine not getting deleted.

/close

from machine-api-operator.

sohrab- avatar sohrab- commented on September 23, 2024

Thanks, @vikaschoudhary16.

A few more questions:

  1. When you say "known behaviour", do you mean this is working as designed or a known bug?
  2. If this is expected, is there any other way to protect against worker loss automatically (self-healing)?
  3. How can we clean-up those orphan Machines now? The underlying instances are gone. Do I need to get into etcd for this?

from machine-api-operator.

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.