Bug 1816398

Summary: It should be possible to use machine health checks with master machines
Product: OpenShift Container Platform Reporter: Clayton Coleman <ccoleman>
Component: Cloud ComputeAssignee: Alberto <agarcial>
Cloud Compute sub component: BareMetal Provider QA Contact: sunzhaohua <zhsun>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: unspecified CC: alpatel, stbenjam
Version: 4.5Keywords: NeedsTestCase
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1961690 (view as bug list) Environment:
Last Closed: 2020-08-27 22:35:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1961690    

Description Clayton Coleman 2020-03-23 22:52:52 UTC
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.

Comment 3 sunzhaohua 2020-04-02 05:21:13 UTC
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

Comment 4 Luke Meyer 2020-08-27 22:35:00 UTC
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'