Description of problem: Machines objects should be linked to nodes and the csr should approved by the machine-approver but due to the missing Machine.Status field the created machines are never linked or approved. Version-Release number of selected component (if applicable): OCP4 Beta How reproducible: 100% Steps to Reproduce: 1. 2. 3. Actual results: without this change there currently two issues on OpenStack: 1.) The cluster will die after some hours because the CSRs are not automatically approved. 2.) The machines that were created via the machine-api are not referenced to the node objects and therefore labels are not synced from the machine definition. Expected results: Machines are correctly created via the machine api Additional info: This has been identified on OCP4 Beta
upstream PR https://github.com/openshift/cluster-api-provider-openstack/pull/29
This bugzilla ticket is actually about two issues: 1) nodelink controller not linking machines (covered by https://github.com/openshift/cluster-api-provider-openstack/pull/29 as instance IP addresses needs to be reported in a machine status) 2) node approver: machine.Status.NodeRef field needs to be set (https://github.com/openshift/cluster-machine-approver/blob/master/csr_check.go#L102-L107). The field is set by the nodelink controller once a machine and node are linked together (requires IP addresses to be set in the machine status) So resolving the first issue will unblock the second one. Switching to POST as https://github.com/openshift/cluster-api-provider-openstack/pull/29 is on review.
Verified in 4.2.0-0.nightly-2019-08-15-232721 on OpenStack Now machines have nodeRef, nodes have machine annotations. oc get machines -n openshift-machine-api -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.nodeRef.name}{"\n"}' wjosp0816d-p6jqc-master-0 wjosp0816d-p6jqc-master-0 wjosp0816d-p6jqc-master-1 wjosp0816d-p6jqc-master-1 wjosp0816d-p6jqc-master-2 wjosp0816d-p6jqc-master-2 wjosp0816d-p6jqc-worker-79z2m wjosp0816d-p6jqc-worker-79z2m wjosp0816d-p6jqc-worker-g87lp wjosp0816d-p6jqc-worker-g87lp wjosp0816d-p6jqc-worker-np44n wjosp0816d-p6jqc-worker-np44n oc get nodes NAME STATUS ROLES AGE VERSION wjosp0816d-p6jqc-master-0 Ready master 73m v1.14.0+c4dfe254f wjosp0816d-p6jqc-master-1 Ready master 73m v1.14.0+c4dfe254f wjosp0816d-p6jqc-master-2 Ready master 73m v1.14.0+c4dfe254f wjosp0816d-p6jqc-worker-79z2m Ready worker 67m v1.14.0+c4dfe254f wjosp0816d-p6jqc-worker-g87lp Ready worker 67m v1.14.0+c4dfe254f wjosp0816d-p6jqc-worker-np44n Ready worker 62m v1.14.0+c4dfe254f oc get nodes -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.metadata.annotations.machine\.openshift\.io\/machine}{"\n"}' wjosp0816d-p6jqc-master-0 openshift-machine-api/wjosp0816d-p6jqc-master-0 wjosp0816d-p6jqc-master-1 openshift-machine-api/wjosp0816d-p6jqc-master-1 wjosp0816d-p6jqc-master-2 openshift-machine-api/wjosp0816d-p6jqc-master-2 wjosp0816d-p6jqc-worker-79z2m openshift-machine-api/wjosp0816d-p6jqc-worker-79z2m wjosp0816d-p6jqc-worker-g87lp openshift-machine-api/wjosp0816d-p6jqc-worker-g87lp wjosp0816d-p6jqc-worker-np44n openshift-machine-api/wjosp0816d-p6jqc-worker-np44n
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-2019:2922