Bug 1074160
| Summary: | NM: ifcfg-rh writer: do not set TYPE for team ports | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Jiri Pirko <jpirko> |
| Component: | NetworkManager | Assignee: | Jirka Klimes <jklimes> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Desktop QE <desktop-qa-list> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.0 | CC: | dcbw, initscripts-maint-list, jklimes, jpirko, jtluka, rkhan, vbenes |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | NetworkManager-0.9.9.1-3.git20140313.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-06-13 12:38:41 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Jiri Pirko
2014-03-08 11:53:34 UTC
Just a note for reproducing this issue.
# cat team0.conf
{
"device": "team0",
"runner": { "name": "activebackup" },
"linkwatch": { "name": "ethtool" }
}
# cat team0-port.conf
{
"eno2": {
"prio": -10,
"sticky": true
}
}
# nmcli c add type team autoconnect no ifname team0 config team0.conf
# nmcli c add type team-slave autoconnect no ifname eno2 master team0 config team0-port.conf
Now check the ifcfg content of team port,
# grep "TYPE" /etc/sysconfig/network-scripts/ifcfg-team-slave-eno2
Without the fix the file contains line "TYPE=Ethernet". If you try to use these generated files with network.service on boot or simply 'ifup team0' (NM is off) it fails since team port is treated as ethernet device not a team port.
It really is reproducible with all configs (even default ones) (In reply to Jiri Pirko from comment #3) > It really is reproducible with all configs (even default ones) Ok, thanks for info. I think this is rather a deficiency of "network.service" (initscripts). The scripts should recognize the ifcfg file is actually TeamPort according to DEVICETYPE=TeamPort.
The same way bridge ports are handled. There is BRIDGE=... that identifies ifcfg file is a bridge port. See /etc/sysconfig/network-scripts/ifup-eth
#If the device is part of a bridge, add the device to the bridge
if [ -n "${BRIDGE}" ] && [ -x /usr/sbin/brctl ]; then
....
No. This is not the initscripts issue. Team support is shipped separately by teamd package. The thing is that teamd package scripts benefit from the possibility to be executed when initscripts find DEVICETYPE=x value. That only works when TYPE is not set. So all is needed is for NM to omit setting TYPE during export. That's all. please backport the following patch as well: https://mail.gnome.org/archives/networkmanager-list/2014-March/msg00012.html From: Jiri Pirko <jiri resnulli us> To: networkmanager-list gnome org Subject: [patch NetworkManager] ifcfg-rh reader: assume type for Team ports Date: Mon, 10 Mar 2014 13:07:10 +0100 Initscripts compatibility requires that if DEVICETYPE is set, TYPE shall not be set. So do something similar we already do for Team masters for Team ports. Even though I think that this should be solved on initscripts side, I see that teamd doesn't want to change initscripts at all. So these changes will workaround the issue in NM. I pushed the code to upstream branch with a testcase change: jk/rh1074160-team-port Jirka, the thing is that this is something which is not changeable inside teamd package. Initscripts package would have to be changed. And that change would be non-trivial. It would practically require adding whole new in-house support for team masters and ports. This was previously refused by iniscripts maintainer. But anyway, the job of NM is to accept existing ifcfgs and to produce acceptable ifcfgs. branch looks fine to me Also probably worth a backport to 0.9.8 (In reply to Dan Williams from comment #11) > Also probably worth a backport to 0.9.8 I agree. The branch looks fine, but: Can things other than ethernet be Team ports? I think the answer is yes... The problem we have there is that if TYPE is empty, and DEVICETYPE=TeamPort, then what kind of device is it? To support anything other than Ethernet, NM would have to inspect the interface itself to figure out if the interface was Ethernet, bridge, bond, veth, etc, right? (note that while we may need to inspect the device to correctly create the connection, I don't think we need to do that before merging the existing branch. We can merge what's there now and cover most of the use-cases, then cover the rest in a follow-up patch.) (In reply to Dan Williams from comment #14) > (note that while we may need to inspect the device to correctly create the > connection, I don't think we need to do that before merging the existing > branch. We can merge what's there now and cover most of the use-cases, then > cover the rest in a follow-up patch.) Currently the initscripts limitation is to support Ethernet only. To support more it would be needed to introduce new in-house support for team into initscripts. The code has been pushed to upstream master as: 8bed556 ifcfg-rh writer: do not set TYPE for team ports (rh #1074160) (In reply to Dan Williams from comment #11) > Also probably worth a backport to 0.9.8 It seems we don't have Team support in nm-0-9-8 at all. Or do I miss anything? after following comment #0 reproducer I received grep "TYPE" /etc/sysconfig/network-scripts/ifcfg-team-slave-eno2 DEVICETYPE=TeamPort This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request. |