Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1970013

Summary: ovs-configuration service fails with bare metal IPI and static ips
Product: OpenShift Container Platform Reporter: David Kaylor <dkaylor>
Component: NetworkingAssignee: Jaime Caamaño Ruiz <jcaamano>
Networking sub component: ovn-kubernetes QA Contact: Ross Brattain <rbrattai>
Status: CLOSED DUPLICATE Docs Contact:
Severity: high    
Priority: high CC: aconstan, akaris, bbennett, bschmaus, jcaamano, rbrattai
Version: 4.7   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-27 10:13:03 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:
Attachments:
Description Flags
ovs-configuration logs none

Description David Kaylor 2021-06-09 15:53:22 UTC
Created attachment 1789612 [details]
ovs-configuration logs

Description of problem:
When doing a bare metal IPI and setting infinite DHCP leases to get a static ip config, networking fails to come up on nodes

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

How reproducible:
Set infinite DHCP leases for a static config and perform a bare metal IPI installation

Actual results:
Nodes come up with no networking and installation fails

Expected results:
Nodes have networking and installation completes successfully

Additional info:
This is a test environment using libvirt and sushy-emulator. After the nodes failed to come up I observed the following:

* The ovs-configuration.service is in a failed state

* There is a good static config in /etc/NetworkManager/system-connections/Wired connection 1.nmconnection

* Disabling the ovs-configuration service and rebooting results in a working network connection

* ovs-configuration logs are attached

Comment 2 Andreas Karis 2021-07-06 12:12:06 UTC
Hi,

This was implicitly fixed with:
https://github.com/jcaamano/machine-config-operator/commit/98896252c6b03abe82f6ebb9275ce334c874fa69#diff-afb45a3711a77d94f26471d9d94a7f7a03d931d9e72bdf849f2e26e2711d6fd7L264

BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1971715

The problem is that currently in 4.7.x, the copy reads:
~~~
cp -f ${old_conn_file} ${new_conn_file}
~~~

When it should be quoted (which will be taken care of by the aforementioned fix):
~~~
cp -f "${old_conn_file}" ${new_conn_file}
~~~

~~~
[root@openshift-master-0 ~]# cp -f /etc/NetworkManager/system-connections-merged/Wired connection 1.nmconnection /etc/NetworkManager/system-connections-merged/ovs-if-br-ex.nmconnection
cp: target '/etc/NetworkManager/system-connections-merged/ovs-if-br-ex.nmconnection' is not a directory
[root@openshift-master-0 ~]# cp -f "/etc/NetworkManager/system-connections-merged/Wired connection 1.nmconnection" "/etc/NetworkManager/system-connections-merged/ovs-if-br-ex.nmconnection"
[root@openshift-master-0 ~]# 
~~~

Comment 3 Andreas Karis 2021-07-06 12:12:54 UTC
Correction:
~~~
cp -f "${old_conn_file}" ${new_conn_file}"
~~~

Comment 4 Ross Brattain 2021-07-19 17:13:10 UTC
(In reply to Andreas Karis from comment #3)
> Correction:
> ~~~
> cp -f "${old_conn_file}" ${new_conn_file}"
> ~~~

Missing a quote, and we should also guard all `cp` and `rm` with `--` to prevent option injections and handle filenames that start with '-'.

Correction:
~~~
cp -f -- "${old_conn_file}" "${new_conn_file}"
~~~

Comment 5 David Kaylor 2021-08-26 16:55:32 UTC
An observation with 4.8: When I create an infinite lease on the DHCP server and install with the BM IPI, RHCOS is not configured with a static IP. I haven't had a chance to trace this out yet but the behavior is different than what I saw with 4.7.

Comment 6 Jaime Caamaño Ruiz 2021-08-27 10:13:03 UTC

*** This bug has been marked as a duplicate of bug 1971715 ***