Bug 2076975 - Metric unset during static route conversion in configure-ovs.sh
Summary: Metric unset during static route conversion in configure-ovs.sh
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.11
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.11.0
Assignee: Andreas Karis
QA Contact: Ross Brattain
URL:
Whiteboard:
Depends On:
Blocks: 2085410
TreeView+ depends on / blocked
 
Reported: 2022-04-20 10:44 UTC by Andreas Karis
Modified: 2022-08-10 11:08 UTC (History)
2 users (show)

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


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift machine-config-operator pull 3100 0 None open Bug 2076975: OVN Kubernetes configure-ovs-network set static if conversion metric 2022-04-20 11:12:57 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:08:06 UTC

Description Andreas Karis 2022-04-20 10:44:40 UTC
Description of problem:

Currently, when static routes are converted to br-ex we do not set the interface metric to $ovs_interface as this here only happens in the `else` section (non-static IP address part):
https://github.com/openshift/machine-config-operator/blob/95b65245fd3506ec0fe9096a41ec8523a548aa41/templates/common/_base/files/configure-ovs-network.yaml#L325
That means that after such a conversion, NM is free to choose whatever metric it likes.

Comment 4 Ross Brattain 2022-05-04 15:39:52 UTC
Verified on 4.11.0-0.nightly-2022-05-04-122854  vSphere UPI ens192 static IP, KUBELET_NODE_IP set.



May 04 14:12:35.528439 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: Static IP addressing detected on default gateway connection: 03da7500-2101-c722-2438-d0d006c28c73
May 04 14:12:35.528521 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + egrep -l '^uuid=03da7500-2101-c722-2438-d0d006c28c73' /etc/NetworkManager/system-connections/br-ex.nmconnection /etc/NetworkManager/system-connections/ovs-if-phys0.nmconnection /etc/Networ
kManager/system-connections/ovs-port-br-ex.nmconnection /etc/NetworkManager/system-connections/ovs-port-phys0.nmconnection
May 04 14:12:35.532365 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + echo 'WARN: unable to find NM configuration file for conn: 03da7500-2101-c722-2438-d0d006c28c73. Attempting to clone conn'
May 04 14:12:35.532365 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: WARN: unable to find NM configuration file for conn: 03da7500-2101-c722-2438-d0d006c28c73. Attempting to clone conn
May 04 14:12:35.532365 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + nmcli conn clone 03da7500-2101-c722-2438-d0d006c28c73 03da7500-2101-c722-2438-d0d006c28c73-clone
May 04 14:12:35.553949 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: ens192 (03da7500-2101-c722-2438-d0d006c28c73) cloned as 03da7500-2101-c722-2438-d0d006c28c73-clone (9c29aec2-db71-407a-88c6-84d7a84d7935).
May 04 14:12:35.555448 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + shopt -s nullglob
May 04 14:12:35.555448 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + old_conn_files=(${NM_CONN_PATH}/"${old_conn}"-clone*)
May 04 14:12:35.555620 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + shopt -u nullglob
May 04 14:12:35.555620 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + '[' 1 -ne 1 ']'
May 04 14:12:35.555620 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + old_conn_file=/etc/NetworkManager/system-connections/03da7500-2101-c722-2438-d0d006c28c73-clone.nmconnection
May 04 14:12:35.555620 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + cloned=true
May 04 14:12:35.555620 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + echo 'Successfully cloned conn to /etc/NetworkManager/system-connections/03da7500-2101-c722-2438-d0d006c28c73-clone.nmconnection'
May 04 14:12:35.555620 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: Successfully cloned conn to /etc/NetworkManager/system-connections/03da7500-2101-c722-2438-d0d006c28c73-clone.nmconnection
May 04 14:12:35.555620 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + echo 'old connection file found at: /etc/NetworkManager/system-connections/03da7500-2101-c722-2438-d0d006c28c73-clone.nmconnection'
May 04 14:12:35.555620 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: old connection file found at: /etc/NetworkManager/system-connections/03da7500-2101-c722-2438-d0d006c28c73-clone.nmconnection
May 04 14:12:35.555968 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: ++ basename /etc/NetworkManager/system-connections/03da7500-2101-c722-2438-d0d006c28c73-clone.nmconnection .nmconnection
May 04 14:12:35.556565 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + old_basename=03da7500-2101-c722-2438-d0d006c28c73-clone
May 04 14:12:35.556666 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + new_conn_file=/etc/NetworkManager/system-connections/ovs-if-br-ex.nmconnection
May 04 14:12:35.556666 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + '[' -f /etc/NetworkManager/system-connections/ovs-if-br-ex.nmconnection ']'
May 04 14:12:35.556666 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + cp -f /etc/NetworkManager/system-connections/03da7500-2101-c722-2438-d0d006c28c73-clone.nmconnection /etc/NetworkManager/system-connections/ovs-if-br-ex.nmconnection
May 04 14:12:35.559653 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + restorecon /etc/NetworkManager/system-connections/ovs-if-br-ex.nmconnection
May 04 14:12:35.564594 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + true
May 04 14:12:35.564594 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + nmcli conn delete 03da7500-2101-c722-2438-d0d006c28c73-clone
May 04 14:12:35.582079 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: Connection '03da7500-2101-c722-2438-d0d006c28c73-clone' (9c29aec2-db71-407a-88c6-84d7a84d7935) successfully deleted.
May 04 14:12:35.583352 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + rm -f /etc/NetworkManager/system-connections/03da7500-2101-c722-2438-d0d006c28c73-clone.nmconnection
May 04 14:12:35.584723 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: ++ nmcli --fields connection.uuid conn show ovs-port-br-ex
May 04 14:12:35.584923 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: ++ awk '{print $2}'
May 04 14:12:35.603152 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + ovs_port_conn=51b065af-9bfa-411f-8634-dc8469092280
May 04 14:12:35.603499 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: ++ cat /proc/sys/kernel/random/uuid
May 04 14:12:35.604212 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + br_iface_uuid=3eb468aa-6b94-49e2-b7df-5ca06cd2bc02
May 04 14:12:35.604212 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + sed -i '/^\[connection\]$/,/^\[/ s/^uuid=.*$/uuid=3eb468aa-6b94-49e2-b7df-5ca06cd2bc02/' /etc/NetworkManager/system-connections/ovs-if-br-ex.nmconnection
May 04 14:12:35.606151 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + sed -i '/^multi-connect=.*$/d' /etc/NetworkManager/system-connections/ovs-if-br-ex.nmconnection
May 04 14:12:35.607829 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + sed -i '/^\[connection\]$/,/^\[/ s/^type=.*$/type=ovs-interface/' /etc/NetworkManager/system-connections/ovs-if-br-ex.nmconnection
May 04 14:12:35.609234 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + sed -i '/^\[connection\]$/,/^\[/ s/^id=.*$/id=ovs-if-br-ex/' /etc/NetworkManager/system-connections/ovs-if-br-ex.nmconnection
May 04 14:12:35.610909 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + sed -i '/^\[connection\]$/a slave-type=ovs-port' /etc/NetworkManager/system-connections/ovs-if-br-ex.nmconnection
May 04 14:12:35.612157 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + sed -i '/^\[connection\]$/a master=51b065af-9bfa-411f-8634-dc8469092280' /etc/NetworkManager/system-connections/ovs-if-br-ex.nmconnection
May 04 14:12:35.613450 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + grep interface-name= /etc/NetworkManager/system-connections/ovs-if-br-ex.nmconnection
May 04 14:12:35.614521 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + sed -i '/^\[connection\]$/,/^\[/ s/^interface-name=.*$/interface-name=br-ex/' /etc/NetworkManager/system-connections/ovs-if-br-ex.nmconnection
May 04 14:12:35.615847 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + grep cloned-mac-address= /etc/NetworkManager/system-connections/ovs-if-br-ex.nmconnection
May 04 14:12:35.616980 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + sed -i '/^\[ethernet\]$/a cloned-mac-address=00:50:56:ac:25:ca' /etc/NetworkManager/system-connections/ovs-if-br-ex.nmconnection
May 04 14:12:35.618337 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + grep mtu= /etc/NetworkManager/system-connections/ovs-if-br-ex.nmconnection
May 04 14:12:35.619230 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + sed -i '/^\[ethernet\]$/a mtu=1500' /etc/NetworkManager/system-connections/ovs-if-br-ex.nmconnection
May 04 14:12:35.620619 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + cat
May 04 14:12:35.621599 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + nmcli c load /etc/NetworkManager/system-connections/ovs-if-br-ex.nmconnection


# metric set

May 04 14:12:35.644854 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + nmcli c mod ovs-if-br-ex ipv4.route-metric 48 ipv6.route-metric 48



May 04 14:12:35.677075 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + echo 'Loaded new ovs-if-br-ex connection file: /etc/NetworkManager/system-connections/ovs-if-br-ex.nmconnection'
May 04 14:12:35.677075 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: Loaded new ovs-if-br-ex connection file: /etc/NetworkManager/system-connections/ovs-if-br-ex.nmconnection
May 04 14:12:35.677075 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + configure_driver_options ens192
May 04 14:12:35.677075 rbrattai-o411v32m-xtm58-compute-0 configure-ovs.sh[1655]: + intf=ens192

Comment 6 errata-xmlrpc 2022-08-10 11:07:44 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.