The current MHC controller does not operator on machines that are not part of a machine set. Not all machines will be part of machine sets, but may be part of other controllers. In particular, masters in OpenShift will likely be run by a custom controller, and the new recovery e2e disaster test wants to simulate that failure mode now (it uses health checks to detect master failure and the test recreates the master in lieu of the new mode). The restriction on MHC to require a machine set should be relaxed to either of: 1. Any machine 2. Any machine if the selector is not 'all machines' 3. Any machine with a controller reference (not owner reference) 4. Other options? The argument against 1 is that it would be too easy to accidentally nuke an uncontrolled master. 2 might reduce the risk, but would introduce a new behavior that would have to be explained. 3 is probably a good compromise - only consider machines that we know have someone watching them. Open to other suggestions. Either way, this behavior needs to be documented as part of the machine health check CRD so that a user understands the limitation. Blocks the e2e master recovery test.
Verified clusterversion: 4.5.0-0.nightly-2020-04-01-204204 Tested below scenarios, all passed. Scenario 1: -create a MHC that covers a machine that belongs to a machineSet. -wait for it to go unhealthy -seem remediaton happening and new machine recreated. Scenario 2: -create a MHC that covers a master machine -wait for it to go unhealthy -remediation should NOT happen. Scenario3: -Create a machine with no machineset and set a fake controller -create a MHC that covers this machine -See remediaton happening BUT no new machine coming up
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:2409'