-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
netplan status --diff fixes and improvements #466
Commits on Jun 12, 2024
-
Configuration menu - View commit details
-
Copy full SHA for c77f93c - Browse repository at this point
Copy the full SHA c77f93cView commit details -
state_diff: add gateway(4|6) to the routes list
The (deprecated but still available) properties gateway4 and gateway6 were not being taken into account when comparing routes. Because of that, the diff report will show the default route as missing in netplan. There is a complication when considering gateway4 and gateway6 though: both networkd and NM will set a metric for them. As these properties cannot set metrics, these routes would still be shown in the diff report. To avoid this noise, when gateway4 and/or gateway6 are used AND the system contains one, and only one, default route per protocol family, we adopt the same metric and route table from the existing routes. By doing this, the comparison will see that both routes, from the system and from netplan, are the same and not show them as a diff.
Configuration menu - View commit details
-
Copy full SHA for b1d9a89 - Browse repository at this point
Copy the full SHA b1d9a89View commit details -
state: use the 'dynamic' field from addr_info
When available, use the flag "dynamic" from addr_info to check if the IP addresses was dynamically assigned. The flag will be displayed in the status output along other flags: Addresses: 10.86.126.222/24 (dynamic, dhcp)
Configuration menu - View commit details
-
Copy full SHA for b774fff - Browse repository at this point
Copy the full SHA b774fffView commit details -
state: add the 'ra' flag to IPv6 addresses
There are cases where IPv6 addresses received via RA are not set as 'dynamic'. In these cases, use the information about routes to find these IPs and add the tag 'ra' to them. It's done by iterating through IPv6 addresses and checking if there is any addresses in the same network as routes received via RA.
Configuration menu - View commit details
-
Copy full SHA for 39476f0 - Browse repository at this point
Copy the full SHA 39476f0View commit details -
api: add a getter for accept-ra
Add the Python binding and unit test. NOTE accept_ra is not perfectly mapped from the netdef structure to the YAML setting and back to the renderer. It's a boolean value in the YAML but it maps to three different values inside libnetplan: kernel, enabled and disabled. Not setting it in the YAML means it will not be set in networkd. Although, networkd will disable it unconditionally in the kernel and will itself handle RAs, meaning that when unset, it's enabled by default (with a few exceptions, see systemd.network(5)). Because of that, the low level C API will return the actual internal value of the property and not only TRUE or FALSE. The Python code will return True, False or None (when it's unset). This will help the consumers to differentiate the case where it's disabled or unset.
Configuration menu - View commit details
-
Copy full SHA for c342a93 - Browse repository at this point
Copy the full SHA c342a93View commit details -
state_diff: improve analysis of RA/LL addresses
When IPv6 link-local and RA (which depends on link-local) are enabled, the system will receive IP addresses, nameservers and routes dynamically via RA. These addresses are not obviously identified as dynamic in the system. networkd probably does have this information but it's not fully exposed apparently. Here I try to improve the comparison of these addresses by checking if they are 1) a link-local address and 2) part of the same network as the route received via RA. Without this, status --diff will show the RA IP addresses and link-local DNS nameserver as a diff.
Configuration menu - View commit details
-
Copy full SHA for 8f8b74e - Browse repository at this point
Copy the full SHA 8f8b74eView commit details -
cli/status: fix plain print with --diff
The logic to remove tags from the output wasn't working for the interface header in diff mode.
Configuration menu - View commit details
-
Copy full SHA for 0f7d3d0 - Browse repository at this point
Copy the full SHA 0f7d3d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 762b73e - Browse repository at this point
Copy the full SHA 762b73eView commit details
Commits on Jun 18, 2024
-
state: make use of networkd ConfigSource
When networkd is used, the ConfigSource property can identify the source of the configuration so let's use it to be more precise and reduce the guessing. We consume the same information when Network Manager is the renderer but in this case networkd will not know the sources so this property can't be relied on. For now, we collect the sources for IP addresses and DNS. Routes can be included in the future. We also should create abstractions for each configuration so we don't need to keep information such as the data source in separate tables. Network Manager seems to expose the source through its DBus API. This also could be considered in the future.
Configuration menu - View commit details
-
Copy full SHA for ca8a0d5 - Browse repository at this point
Copy the full SHA ca8a0d5View commit details
Commits on Jun 26, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 692f902 - Browse repository at this point
Copy the full SHA 692f902View commit details