Bug 502142
| Summary: | NM_CONTROLLED=no doesn't work when link comes up | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Mads Kiilerich <mads> |
| Component: | NetworkManager | Assignee: | Dan Williams <dcbw> |
| Status: | CLOSED WORKSFORME | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 10 | CC: | arxs, danw, dcbw |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2009-11-11 17:31:38 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Mads Kiilerich
2009-05-22 08:28:57 UTC
Some notes analysing the problem: system-settings/plugins/ifcfg-rh/reader.c connection_from_file parses NM_CONTROLLED and stores it in *ignored, which ends up as .unmanaged and returned by nm-ifcfg-connection.c nm_ifcfg_connection_get_unmanaged. When the interface gets link then nm-manager.c hal_manager_udi_added_cb gets called. It sees it as a "new" device creates a "new Ethernet device". It looks like a nm_ifcfg_connection_get_unmanaged (connection) is missing somewhere, but I get lost in the callbacks and can't figure out where and at which level it belongs. What happens is that nm-system-settings in plugins/ifcfg-rh/plugin.c read_one_connection() calls nm_ifcfg_connection_new() and correctly goes "Ignoring connection 'System eth0' and its device because NM_CONTROLLED was false". But the very next moment NetworkManager in nm-manager.c handle_unmanaged_devices() no unmanaged devices are found and marked, so eth0 now becomes marked as managed and it goes "Added default wired connection 'Auto eth0' for /org/freedesktop/Hal/devices/net_00_1e_37_84_97_74" I assume that NM_CONTROLLED=0 devices should end up as "unmanaged devices"? How should they get there? Is it a race condition in the communication between the two processes? This bug has been triaged -- Fedora Bugzappers volunteer triage team https://fedoraproject.org/wiki/BugZappers Pwew. The problem was trigged by me not specifying HWADDR. The list of unmanaged devices is created by looking each ifcfg mac address up in HAL to get the UDI, and when no HWADDR is specified in an ifcfg file with NM_CONTROLLED=no then the disabling is silently ignored. NM has to work together with - and thus to some extent duplicate - the functionality in /etc/sysconfig/network-scripts scripts. But rigth now NM always does what corresponds to network-functions get_config_by_hwaddr(mac_addr). But the scripts tries get_hwaddr(device_name) first, and I would expect NM to do the same. A patch has been posted on http://mail.gnome.org/archives/networkmanager-list/2009-May/msg00212.html Thanks for the patch; however, HWADDR is mandatory. There is no other mechanism besides MAC address to match the ifcfg to a *specific* piece of network hardware. If HWADDR isn't present in the ifcfg file, then there is no possibility to match up the ifcfg file's settings with a specific hardware device. Any idea why the ifcfg did not contain the HWADDR option in the first place? Closing worksforme since the fix was adding HWADDR, which is normally what system-config-network and anaconda do when creating connections as well. |