Bug 2048686 - Check MAC address provided on the install-config.yaml file
Summary: Check MAC address provided on the install-config.yaml file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.11
Hardware: All
OS: All
low
low
Target Milestone: ---
: 4.11.0
Assignee: Arda Guclu
QA Contact: Amit Ugol
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-31 17:35 UTC by Leo Ochoa
Modified: 2022-08-10 10:46 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-10 10:45:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 10:46:22 UTC

Description Leo Ochoa 2022-01-31 17:35:28 UTC
Take below snipped (from an install-config.yaml) as an example.

```
    hosts:
      - name: jetlag-bm1
        role: master
        bmc:
          address: ipmi://<BMC_IP_HERE>
          username: <BMC_USER_HERE>
          password: <BMC_PASSWORD_HERE>
          disableCertificateVerification: true
        bootMACAddress: 0c:c4:7a:d3:1a  --> the correct MAC is 0c:c4:7a:d3:1a:28
        hardwareProfile: default
        rootDeviceHints:
          deviceName: /dev/sda
```

As you can see the MAC address misses the last two hexadecimal digits, however, the ./openshift-baremetal-install tool tries an installation that is going to fail on Ironic checks with something similar to below.

```
Jan 31 08:56:19 localhost bootkube.sh[5810]: "99_openshift-cluster-api_hosts-1.yaml": failed to create baremetalhosts.v1alpha1.metal3.io/jetlag-bm2 -n openshift-machine-api: BareMetalHost.metal3.io "jetlag-bm2" is invalid: spec.bootMACAddress: Invalid value: "0c:c4:7a:a4:eb": spec.bootMACAddress in body should match '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'
```

Maybe we could detect this typo from the beginning similar to the validations that are done for apiVIP, and ingressVIP.

Comment 1 Arda Guclu 2022-02-17 07:43:48 UTC
https://github.com/metal3-io/baremetal-operator/pull/1087 is for update cases.

Comment 2 Arda Guclu 2022-02-17 12:20:10 UTC
https://github.com/openshift/installer/pull/5652 is for the install-config

Comment 5 errata-xmlrpc 2022-08-10 10:45:53 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 (Important: OpenShift Container Platform 4.11.0 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-2022:5069


Note You need to log in before you can comment on or make changes to this bug.