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.

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: NetworkManagerAssignee: Jirka Klimes <jklimes>
Status: CLOSED CURRENTRELEASE QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: 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
please backport following patch:

https://mail.gnome.org/archives/networkmanager-list/2014-March/msg00011.html

[patch NetworkManager] ifcfg-rh writer: do not se TYPE for team ports

    From: Jiri Pirko <jiri resnulli us>
    To: networkmanager-list gnome org
    Subject: [patch NetworkManager] ifcfg-rh writer: do not se TYPE for team ports
    Date: Sat, 8 Mar 2014 12:48:09 +0100

The problem is that initscripts rewrite DEVICETYPE in case TYPE is specified
which prevents team port from being configured. Fix this by removing TYPE.

Comment 2 Jan Tluka 2014-03-10 08:20:57 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.

Comment 3 Jiri Pirko 2014-03-10 08:55:48 UTC
It really is reproducible with all configs (even default ones)

Comment 4 Jan Tluka 2014-03-10 09:52:21 UTC
(In reply to Jiri Pirko from comment #3)
> It really is reproducible with all configs (even default ones)

Ok, thanks for info.

Comment 5 Jirka Klimes 2014-03-10 11:13:52 UTC
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
....

Comment 6 Jiri Pirko 2014-03-10 11:39:19 UTC
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.

Comment 7 Jiri Pirko 2014-03-10 12:09:12 UTC
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.

Comment 8 Jirka Klimes 2014-03-10 12:17:44 UTC
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

Comment 9 Jiri Pirko 2014-03-10 12:28:38 UTC
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.

Comment 10 Dan Williams 2014-03-10 14:42:16 UTC
branch looks fine to me

Comment 11 Dan Williams 2014-03-10 15:19:49 UTC
Also probably worth a backport to 0.9.8

Comment 12 Jiri Pirko 2014-03-10 15:27:42 UTC
(In reply to Dan Williams from comment #11)
> Also probably worth a backport to 0.9.8

I agree.

Comment 13 Dan Williams 2014-03-11 16:58:38 UTC
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?

Comment 14 Dan Williams 2014-03-11 17:00:39 UTC
(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.)

Comment 15 Jiri Pirko 2014-03-11 17:20:37 UTC
(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.

Comment 16 Jirka Klimes 2014-03-12 09:24:23 UTC
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?

Comment 18 Vladimir Benes 2014-03-14 14:04:01 UTC
after following comment #0 reproducer I received
grep "TYPE" /etc/sysconfig/network-scripts/ifcfg-team-slave-eno2
DEVICETYPE=TeamPort

Comment 19 Ludek Smid 2014-06-13 12:38:41 UTC
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.