eclipse-kura / kura

Eclipse Kura™ is a versatile framework to supercharge your edge devices, streamlining the process of configuring your gateway, connecting sensors, and IoT devices to seamlessly collect, process, and send data to the cloud.
https://eclipse.dev/kura/
Eclipse Public License 2.0
498 stars 305 forks source link

fix: Network failover configuration fixes #5371

Open pierantoniomerlino opened 1 day ago

pierantoniomerlino commented 1 day ago

This PR does the following:

Related Issue: This PR fixes/closes N/A

Description of the solution adopted: The network failover feature of NM fails since the expected message in the configuration file is wrong: "NetworkManager is online" instead of NetworkManager is online. Moreover, the ignore-carrier property is removed, since the default configuration is to detect the missing carrier. According to this and this resource, the ignore-carrier property for NM specifies if NM will ignore the carrier state. If it is not ignored, when a cable is unplugged, the IP address and IP routes are removed. In this way, NM will fallback to another interface if the priority is set.

Manual Tests: Configure two ethernet interfaces as WAN (i.e. eno1 and enp5s0). Assign to them a priority. Check that the property is correctly configured in NetworkManager (use nmcli) and the route priorities are set in the system (use ip route or route -n). Check that the priorities are not increased by 20000. Check with traceroute the device path followed to reach google and check that the interface with higher priority is used. Unplug the cable from the high priority interface and check that it is possible to reach Internet via the other interface.

Moreover, using nmcli check that the unplugged interface has not an IP address and with route -n the route has been removed.