Bug 1967662

Summary: machine-api-operator should not use deprecated "platform" field in infrastructures.config.openshift.io
Product: OpenShift Container Platform Reporter: Michael McCune <mimccune>
Component: Cloud ComputeAssignee: Michael McCune <mimccune>
Cloud Compute sub component: Other Providers QA Contact: Milind Yadav <miyadav>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified    
Version: 4.8   
Target Milestone: ---   
Target Release: 4.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-27 23:11:27 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:

Description Michael McCune 2021-06-03 14:43:38 UTC
Description of problem:

Currently the machine-api-operator looks at the `status.platform` field to determine the cloud provider. This field is being deprecated[0] and should be replaced with `status.platformStatus.type` instead.


[0] https://github.com/openshift/api/blob/master/config/v1/0000_10_config-operator_01_infrastructure.crd.yaml#L216

Comment 2 Milind Yadav 2021-06-07 11:58:13 UTC
Validated on clusterversion :
[miyadav@miyadav ~]$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.8.0-0.nightly-2021-06-03-160817   True        False         63m     Cluster version is 4.8.0-0.nightly-2021-06-03-160817
[miyadav@miyadav ~]$ 

Below is what I got for cluster infrastruture object yaml :oc get infrastructure cluster -o yaml | less 

.
.
.
spec:
  cloudConfig:
    name: ""
  platformSpec:
    aws: {}
    type: AWS
status:
  apiServerInternalURI: https://api-int.ci-ln-1rx2x2k-d5d6b.origin-ci-int-aws.dev.rhcloud.com:6443
  apiServerURL: https://api.ci-ln-1rx2x2k-d5d6b.origin-ci-int-aws.dev.rhcloud.com:6443
  controlPlaneTopology: HighlyAvailable
  etcdDiscoveryDomain: ""
  infrastructureName: ci-ln-1rx2x2k-d5d6b-st8gw
  infrastructureTopology: HighlyAvailable
  platform: AWS
  platformStatus:
    aws:
      region: us-west-1
    type: AWS
.
.

Additional info:
As per pull request we are checking for the correct values infra.platformstatus.type , Hence moving to VERIFIED .

Comment 5 errata-xmlrpc 2021-07-27 23:11:27 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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), 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/RHSA-2021:2438