Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1802956

Summary: MachineHealthcheck can not get machine status
Product: OpenShift Container Platform Reporter: Milind Yadav <miyadav>
Component: Cloud ComputeAssignee: Alberto <agarcial>
Status: CLOSED NOTABUG QA Contact: Jianwei Hou <jhou>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.4Keywords: Regression
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-14 10:10:45 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: 1800423    

Description Milind Yadav 2020-02-14 08:47:43 UTC
Description of problem:MachineHealthcheck can not get machine status


Version-Release number of selected component (if applicable):
Tested on :NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.4.0-0.nightly-2020-02-13-212616   True        False         7h19m   Cluster version is 4.4.0-0.nightly-2020-02-13-212616


How reproducible:


Steps to Reproduce:
1.1.Create a mhc on osp platform 
apiVersion: machine.openshift.io/v1beta1
kind: MachineHealthCheck
metadata:
  name: example
  namespace: openshift-machine-api
spec:
  selector:
    matchLabels:
      machine.openshift.io/cluster-api-cluster: <your cluster name>
      machine.openshift.io/cluster-api-machine-role: worker
      machine.openshift.io/cluster-api-machine-type: worker
      machine.openshift.io/cluster-api-machineset: <Your machineset name>
  unhealthyConditions:
    - type: Ready
      status: Unknown
      timeout: 300s
    - type: Ready
      status: 'False'
      timeout: 300s
  maxUnhealthy: 3
  
  Expected Result
  
  mhc should get created successfully
  
2.run oc get mhc

Actual result :
 MAXUNHEALTHY   EXPECTEDMACHINES   CURRENTHEALTHY
<your mhc>   3              0                  0 

Expected :
Expected and Current healthy should be shown as per cluster and should not be 0 


Additional info:
For more info Run oc get mhc <Your machine healthcheck> -o yaml

and get mhc controller log by running :

oc log <Machine controller Pod> -c machine-healthcheck-controller

We got below :
machinehealthcheck_controller.go:378] No-op: Unable to retrieve machine from node "/qe-jhou-bh4xj-master-2": expecting one machine for node qe-jhou-bh4xj-master-2, got: []
E0214 00:30:22.323369       1 machinehealthcheck_controller.go:378] No-op: Unable to retrieve machine from node "/qe-jhou-bh4xj-master-1": expecting one machine for node qe-jhou-bh4xj-master-1, got: []
E0214 00:30:22.323399       1 machinehealthcheck_controller.go:378] No-op: Unable to retrieve machine from node "/qe-jhou-bh4xj-master-0": expecting one machine for node qe-jhou-bh4xj-master-0, got: []
E0214 00:30:27.460020       1 machinehealthcheck_controller.go:378] No-op: Unable to retrieve machine from node "/qe-jhou-bh4xj-master-2": expecting one machine for node qe-jhou-bh4xj-master-2, got: []
E0214 00:30:27.460064       1 machinehealthcheck_controller.go:378] No-op: Unable to retrieve machine from node "/qe-jhou-bh4xj-master-2": expecting one machine for node qe-jhou-bh4xj-master-2, got: []
E0214 00:30:47.423797       1 machinehealthcheck_controller.go:378] No-op: Unable to retrieve machine from node "/qe-jhou-bh4xj-master-0": expecting one machine for node qe-jhou-bh4xj-master-0, got: []
E0214 00:30:47.423948       1 machinehealthcheck_controller.go:378] No-op: Unable to retrieve machine from node "/qe-jhou-bh4xj-master-0": expecting one machine for node qe-jhou-bh4xj-master-0, got: []
E0214 00:31:17.457444       1 machinehealthcheck_controller.go:378] No-op: Unable to retrieve machine from node "/qe-jhou-bh4xj-master-0": expecting one machine for node qe-jhou-bh4xj-master-0, got: []
E0214 00:31:17.457579       1 machinehealthcheck_controller.go:378] No-op: Unable to retrieve machine from node "/qe-jhou-bh4xj-master-0": expecting one machine for node qe-jhou-bh4xj-master-0, got: []
E0214 00:37:49.283329       1 machinehealthcheck_controller.go:378] No-op: Unable to retrieve machine from node "/qe-jhou-bh4xj-worker-bthqd": expecting one machine for node qe-jhou-bh4xj-worker-bthqd, got: []
E0214 00:38:37.729865       1 machinehealthcheck_controller.go:378] No-op: Unable to retrieve machine from node "/qe-jhou-bh4xj-worker-ngz2r": expecting one machine for node qe-jhou-bh4xj-worker-ngz2r, got: []
E0214 00:38:58.262127       1 machinehealthcheck_controller.go:378] No-op: Unable to retrieve machine from node "/qe-jhou-bh4xj-worker-6d8x5": expecting one machine for node qe-jhou-bh4xj-worker-6d8x5, got: []
I0214 05:15:26.328810       1 machinehealthcheck_controller.go:149] Reconciling openshift-machine-api/bugzilla-1800423