-
Bug
-
Resolution: Done
-
Undefined
-
None
-
4.19.z
-
None
-
Quality / Stability / Reliability
-
False
-
-
None
-
Important
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Description of problem:
configure-ovs.sh will fail with code 4 if the IPv6 default route of the node is a link local IPv6 (fe80...).
Logs:
Aug 29 14:14:39 node2 configure-ovs.sh[6535]: inet 192.168.128.182/24 brd 192.168.128.255 scope global dynamic noprefixroute enp1s0 Aug 29 14:14:39 node2 configure-ovs.sh[6535]: valid_lft 7175sec preferred_lft 7175sec Aug 29 14:14:39 node2 configure-ovs.sh[6535]: inet6 2a02:a03f:a01d:1a02:b241:6fff:fe0f:3d56/64 scope global dynamic noprefixroute Aug 29 14:14:39 node2 configure-ovs.sh[6535]: valid_lft 86377sec preferred_lft 14377sec Aug 29 14:14:39 node2 configure-ovs.sh[6535]: inet6 fe80::b241:6fff:fe0f:3d56/64 scope link noprefixroute Aug 29 14:14:39 node2 configure-ovs.sh[6535]: valid_lft forever preferred_lft forever Aug 29 14:14:39 node2 configure-ovs.sh[3342]: ++ ip route show Aug 29 14:14:39 node2 configure-ovs.sh[6536]: default via 192.168.128.1 dev enp1s0 proto dhcp src 192.168.128.182 metric 100 Aug 29 14:14:39 node2 configure-ovs.sh[6536]: 192.168.128.0/24 dev enp1s0 proto kernel scope link src 192.168.128.182 metric 100 Aug 29 14:14:39 node2 configure-ovs.sh[3342]: ++ ip -6 route show Aug 29 14:14:39 node2 configure-ovs.sh[6537]: ::1 dev lo proto kernel metric 256 pref medium Aug 29 14:14:39 node2 configure-ovs.sh[6537]: 2a02:a03f:a01d:1a02::/64 dev enp1s0 proto ra metric 100 pref medium Aug 29 14:14:39 node2 configure-ovs.sh[6537]: fe80::/64 dev enp1s0 proto kernel metric 1024 pref medium Aug 29 14:14:39 node2 configure-ovs.sh[6537]: default via fe80::2e0:67ff:fe1f:9b0d dev enp1s0 proto ra metric 100 pref medium Aug 29 14:14:39 node2 configure-ovs.sh[3342]: ++ exit 4 Aug 29 14:14:39 node2 configure-ovs.sh[3338]: + e=4 Aug 29 14:14:39 node2 configure-ovs.sh[3338]: + trap handle_termination INT TERM Aug 29 14:14:39 node2 configure-ovs.sh[3338]: + '[' 4 -eq 0 ']' Aug 29 14:14:39 node2 configure-ovs.sh[3338]: + '[' -z 15m ']' Aug 29 14:14:39 node2 configure-ovs.sh[3338]: + echo 'configure-ovs failed, will retry after 15m' Aug 29 14:14:39 node2 configure-ovs.sh[3338]: configure-ovs failed, will retry after 15m Aug 29 14:14:39 node2 configure-ovs.sh[3338]: + touch /tmp/configure-ovs-retry Aug 29 14:14:39 node2 configure-ovs.sh[3338]: + sleep 15m
-
- Deconstructing the Log
Initial State Captured: The first part of the log shows the script's print_state function correctly reading the network configuration of the enp1s0 interface before making any changes. It sees the global IPv6 address: inet6 2a02:a03f:a01d:1a02:... It sees the IPv4 route: default via 192.168.128.1 dev enp1s0 Most importantly, it sees the problematic IPv6 default route: default via fe80::2e0:67ff:fe1f:9b0d dev enp1s0 The Failure Trigger: The script proceeds with its reconfiguration logic based on this initial state. It creates the br-ex bridge, moves the IP addresses from enp1s0 to the bridge, and enslaves enp1s0. This action immediately breaks the IPv6 default route. The script eventually calls the activate_nm_connections function. Inside that function, it executes nmcli conn up for the new OVS connections (like ovs-if-br-ex), failing with code 4.
AI Generated code excerpt (not tested) to fix the bug (add a new default route):
# ... (inside the convert_to_bridge function) ipv6.method "${ipv6_method}" ipv6.route-metric "${bridge_metric}" \ ${extra_if_brex_args} fi fi # --- START: Added code to fix IPv6 link-local default route --- # Check for a link-local default route on the original interface old_ipv6_route=$(ip -6 route show default dev "${iface}" | grep 'via fe80::') if [[ -n "${old_ipv6_route}" ]]; then echo "Detected link-local IPv6 default route. Recreating it on ${bridge_name}." # Extract gateway and metric from the old route gateway=$(echo "${old_ipv6_route}" | awk '{print $3}') metric=$(echo "${old_ipv6_route}" | awk '/metric/ {print $(NF-1)}') # Gets the value before 'pref' # Deactivate the old connection to release the interface and route echo "Deactivating old connection ${old_conn} on device ${iface}." nmcli connection down "${old_conn}" || echo "Old connection was already down. Proceeding." # Add the corrected default route pointing to the new bridge interface echo "Adding new default route: via ${gateway} dev ${bridge_name} metric ${metric}" ip -6 route add default via "${gateway}" dev "${bridge_name}" metric "${metric}" fi # --- END: Added code --- configure_driver_options "${iface}" }
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
Actual results:
Expected results:
Additional info: