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 1545574

Summary: [NMCI] team_abs_set_runner_hwaddr_policy failing on ppv64
Product: Red Hat Enterprise Linux 7 Reporter: Vladimir Benes <vbenes>
Component: libteamAssignee: Xin Long <lxin>
Status: CLOSED ERRATA QA Contact: LiLiang <liali>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.5CC: atragler, bgalvani, fgiudici, haliu, lrintel, lxin, network-qe, rkhan, sukulkar, thaller
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libteam-1.27-7.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 13:17:33 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:
Attachments:
Description Flags
teamd log
none
teamd state dump none

Description Vladimir Benes 2018-02-15 10:02:54 UTC
Description of problem:
this test seems to behave differently on ppc64 over other arches.
https://github.com/NetworkManager/NetworkManager-ci/blob/master/nmcli/features/team.feature#L876

It looks that activation of team slaves play different role when this arch is used and  activebackup team.runner-hwaddr-policy set to by_active

upping 
team0
team0.0
team0.1 
leads to team0 having team0.1 mac address but on other arches it uses team0.0's.

Not sure if the test is 100% correct but such different behaviour is weird. Maybe it's caused by teamd itself. Do not know.

Version-Release number of selected component (if applicable):
teamd-1.27-4.el7
NetworkManager-1.10.2-12.el7
kernel-3.10.0-851.el7

Comment 3 Beniamino Galvani 2018-09-29 12:30:13 UTC
I tried the following configuration using teamd directly without NM on
a PPC64 machine:

{
 	"device":       "team0",
	"runner":       {
                        "name": "activebackup",
			"hwaddr_policy": "by_active"
	},
        "ports":        {
		"veth0": {
                        "prio": -10,
			"sticky": true
		},
                "veth2": {
                        "prio": 100
		}
	}
}

and indeed the second port becomes the active one, while on x86_64 it
is the first port. I'm not sure this is expected, I'm reassigning the bug
to teamd for investigation. I'll attach activation logs and the teamd
state dump on PPC64.

Comment 4 Beniamino Galvani 2018-09-29 12:31:29 UTC
Created attachment 1488355 [details]
teamd log

Comment 5 Beniamino Galvani 2018-09-29 12:32:02 UTC
Created attachment 1488356 [details]
teamd state dump

Comment 6 Hangbin Liu 2018-10-26 08:55:55 UTC
update: After debug, it turns out that function team_get_active_port() could not get current active port and set it to 0. Then in function ab_link_watch_handler(), it clears the current active port veth0 and set to veth2.

Function get_options() also could not get correct priority. We can use examples/team_manual_control.c to reproduce this issue easily.

The odd thing is that I wrote a program with libnl and it works well. I can get correct active port and priority.

Via print kernel message, I found libteam send request correctly and kernel replies correct message. So there should be something wrong when libteam receive and deal with the data.

Comment 7 Hangbin Liu 2018-11-07 01:57:42 UTC
Hi Xin Long,

The patch[1] has been applied for upstream. Please help back port it to fix the bug.

[1] https://github.com/jpirko/libteam/commit/c35bece57a499036

Thanks
Hangbin

Comment 8 LiLiang 2018-12-05 02:16:41 UTC
Hi Hangbin,

1. Does this only occur on ppc6e arch?

2. From comment #0, i see this relevant to hwaddr_policy, but from comment #3, i see this is a active port relevant issue, so how should i reprodece and test this bz?  Would you please give me a reproducer?

Comment 9 Hangbin Liu 2018-12-05 06:17:50 UTC
(In reply to LiLiang from comment #8)
> Hi Hangbin,
> 
> 1. Does this only occur on ppc6e arch?

yes
> 
> 2. From comment #0, i see this relevant to hwaddr_policy, but from comment
> #3, i see this is a active port relevant issue, so how should i reprodece
> and test this bz?  Would you please give me a reproducer?

It's a active port relevant issue. But you can just use the config file in comment 3 to reproduce.

Comment 11 LiLiang 2019-06-21 05:37:19 UTC
reproduced:
[root@ibm-p720-02-lp2 ~]# teamdctl team0 state
setup:
  runner: activebackup
ports:
  veth0
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up
        down count: 0
  veth2
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up
        down count: 0
runner:
  active port: veth2
[root@ibm-p720-02-lp2 ~]# 
[root@ibm-p720-02-lp2 ~]# 
[root@ibm-p720-02-lp2 ~]# rpm -q libteam
libteam-1.27-4.el7.ppc64

Comment 12 LiLiang 2019-06-21 05:39:52 UTC
verified:
[root@ibm-p720-02-lp2 ~]# teamdctl team0 state
setup:
  runner: activebackup
ports:
  veth0
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up
        down count: 0
  veth2
    link watches:
      link summary: up
      instance[link_watch_0]:
        name: ethtool
        link: up
        down count: 0
runner:
  active port: veth0
[root@ibm-p720-02-lp2 ~]# rpm -q libteam
libteam-1.27-9.el7.ppc64

Comment 14 errata-xmlrpc 2019-08-06 13:17:33 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2310