Bug 1852959

Summary: baremetal cluster-api provider should set providerID on Machines/Nodes
Product: OpenShift Container Platform Reporter: Steven Hardy <shardy>
Component: Bare Metal Hardware ProvisioningAssignee: Steven Hardy <shardy>
Bare Metal Hardware Provisioning sub component: cluster-api-provider QA Contact: Daniel <dmaizel>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: dhellmann, rbryant
Version: 4.6Keywords: Triaged
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 16:11:46 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 Steven Hardy 2020-07-01 16:31:14 UTC
Description of problem:

The cluster autoscaler expects there to be a providerID on both Machine and Node objects e.g for AWS:

  https://github.com/openshift/cluster-api-provider-aws/blob/master/pkg/actuators/machine/reconciler.go#L289-L295

That convention matches what the kube controller manager aws cloud provider sets on the Node.ProviderID.

For baremetal there’s no cloud provider so the machine controller (or an adhoc controller run by the same manager) will need to set the providerID on the nodes as well

Version-Release number of selected component (if applicable):
4.6

How reproducible:
Always

Steps to Reproduce:
1. Deploy a baremetal IPI cluster that includes workers
2. Look at the Machine/Node resources


Actual results:

There is no providerID set on either.

Expected results:

the providerID should be set on both machine and node resources.


Additional info:

Comment 4 Steven Hardy 2020-07-02 09:32:27 UTC
Ok so just for reference I created an AWS cluster to confirm what the spec looks like, it's a string ID so I think we can create an arbitrary identifier e.g "baremetal:<ID>" in the CAPBM to address this.

Machine:

  spec:
    metadata:
      creationTimestamp: null
    providerID: 'aws:///us-west-2a/i-0123456789'


Node:

  spec:
    providerID: 'aws:///us-west-2a/i-0123456789'

Comment 9 errata-xmlrpc 2020-10-27 16:11:46 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 (OpenShift Container Platform 4.6 GA Images), 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:4196