Bug 2054770

Summary: IPI baremetal deployment metal3 pod crashes when using capital letters in hosts bootMACAddress
Product: OpenShift Container Platform Reporter: Jay Cromer <jcromer>
Component: Bare Metal Hardware ProvisioningAssignee: Tomas Sedovic <tsedovic>
Bare Metal Hardware Provisioning sub component: ironic QA Contact: epassaro
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: bfournie, imelofer, lshilin, vkochuku, yliu1, zbitter
Version: 4.9Keywords: Triaged
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 10:49:51 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 Jay Cromer 2022-02-15 16:49:54 UTC
Description of problem: 

When performing a baremetal IPI deployment, if you use capital letters in the bootMACAddress of the hosts section of install-config.yaml the metal3 pod will fail to start because of a case sensitive grep that is being used to match MAC addresses in the static-ip-set init container.


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


How reproducible:

Every time

Steps to Reproduce:

1. Perform a BM IPI deployment 
2. Use capital letters in bootMACAddress in the hosts section of install-config.yaml
3. Observe metal3 pod crashloop

Actual results:

Although cluster deployment is successful, the metal3 pod experiences continual crashloops

Expected results:

Successful deployment with no errors

Additional info:

There is an init container in metal3 called static-ip-set. This container does a grep -q of mac addresses to determine a match.  Because of the capital letters in the bootMACAddress of the host in the install-config.yaml, the grep fails. Would be better to do a case-insensitive grep.  

https://github.com/openshift/ironic-static-ip-manager/blob/master/set-static-ip#L11

$ oc -n openshift-machine-api get pods
NAME                                           READY   STATUS                  RESTARTS       AGE
cluster-autoscaler-operator-7965fd9b98-nfwfn   2/2     Running                 0              42m
cluster-baremetal-operator-69b6999f5d-pl2jg    2/2     Running                 2 (14m ago)    42m
machine-api-controllers-7954497b69-djh6t       7/7     Running                 0              14m
machine-api-operator-f6fdd96df-4l6jf           2/2     Running                 0              42m
metal3-6dfcdb9554-mt6bz                        0/10    Init:CrashLoopBackOff   7 (107s ago)   13m
metal3-image-cache-7jszr                       0/1     Init:0/2                1 (2m4s ago)   13m
metal3-image-cache-8mbj2                       0/1     Init:0/2                1 (97s ago)    13m
metal3-image-cache-nzrw5                       0/1     Init:0/2                1 (93s ago)    13m

$ oc -n openshift-machine-api logs metal3-6dfcdb9554-mt6bz -c metal3-static-ip-set
+ '[' -z 172.22.0.3/24 ']'
+ '[' -z '' ']'
+ '[' -n 14:18:77:32:5B:6A,14:18:77:32:28:6F,14:18:77:32:4E:9A ']'
+ for mac in ${PROVISIONING_MACS//,/ }
+ ip -br link show up
+ grep -q 14:18:77:32:5B:6A
+ for mac in ${PROVISIONING_MACS//,/ }
+ ip -br link show up
+ grep -q 14:18:77:32:28:6F
+ for mac in ${PROVISIONING_MACS//,/ }
+ ip -br link show up
+ grep -q 14:18:77:32:4E:9A
+ '[' -n '' ']'
+ echo 'ERROR: Could not find suitable interface for "172.22.0.3/24"'
ERROR: Could not find suitable interface for "172.22.0.3/24"

Comment 3 epassaro 2022-02-24 15:06:11 UTC
Verified in version 4.11.0-0.nightly-2022-02-23-045027

Comment 5 errata-xmlrpc 2022-08-10 10:49:51 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