Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
In nmstate we would like to report the duplex setting of a device but NM does not provide this, for example via a dev.get_duplex() method. Please add it.
the problem with this is, that ethtool options are (AFAIK) not exposed via netlink. That means, NetworkManager gets no notification when the value changes. So, to expose the property on D-Bus, NetworkManager can only poll for the value (either periodically, or once during activation of the profile).
Also note, that while the feature might be interesting, there is already the ethtool kernel API which exposes this setting. So, exposing this on D-Bus is only slightly better then just querying ethtool.
The advantage of providing this settings via Network Manager is that it leads to a uniform API to get network settings, namely via Network Manager, instead of having to figure out that some settings can be obtained via Network Manager but others cannot (for example speed is available via dev.get_speed(). Also it seems that Network Manger already contains the code to get the ethtool settings:
src/devices/nm-device-ethernet.c:
nm_platform_ethtool_get_link_settings (NMPlatform *self, int ifindex, gboolean *out_autoneg, guint32 *out_speed, NMPlatformLinkDuplexType *out_duplex)
but there is only one method that uses the out_speed to store it as a device property instead of also storing autoneg and duplex.
src/devices/nm-device-ethernet.c:
link_speed_update (NMDevice *device)
[...]
if (!nm_platform_ethtool_get_link_settings (nm_device_get_platform (device), nm_device_get_ifindex (device), NULL, &speed, NULL))
Not sure, when link_speed_update() is called but if it could be changed to link_update() and then just store duplex and autoneg settings, too, it would be great.
About polling, isn't it enough to poll the settings once it creates a device object to return via dBus? There is no need to update the state internally when nobody asks AFAICS.
Another scenario came up that makes this more important: There is interest to run nmstate in a container to manage networking on the host by mounting the dbus socket into the container. To support this fully, everything would need to be done via NetworkManager since running ethtool in the container would report the wrong data.
Comment 6Marcelo Ricardo Leitner
2019-07-03 15:10:47 UTC
Mass-moving bugs RHEL <= 7.6.0 to 7.7.0.
As we are past RFE deadline for 7.7.0 and we should have no new features on 7.8.0, please evaluate if it's still wanted on RHEL7 and contact PM for exception. You may also move it to RHEL8 if that's wanted. Thanks!