libteam icon indicating copy to clipboard operation
libteam copied to clipboard

teamd fails to create team device

Open init-js opened this issue 10 years ago • 4 comments

teamd cannot create an empty team device.

Error Environment:

  • libteam/teamd 1.17 (without support for 0mq, nor dbus)
  • Linux foo 3.19.0-21-generic #21~14.04.1-Ubuntu SMP Sun Jun 14 18:45:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
  • Linux foo 3.16.0-28-generic #38-Ubuntu SMP Sat Dec 13 16:13:28 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux (also got the error on that kernel)
  • libnl 3.2.3-2ubuntu2

Modules loaded:

root@foo:~# lsmod | grep team
team_mode_activebackup    16384  0 
team_mode_roundrobin    16384  0 
team                   40960  2 team_mode_activebackup,team_mode_roundrobin

Steps:

root@foo~# ip link show team0
Device "team0" does not exist.
root@foo:~# teamd -n -g -t team0
Using team device "team0".
Using PID file "/var/run/teamd/team0.pid"
Failed to create team device.
teamd_init() failed.
Failed: Operation not supported

(see out.log for output of strace -f)

I can however create the team interface manually with the ip utility and use the -o flag:

root@foo:~# ip link add name team0 type team
root@foo:~# teamd -o -n -g -t team0
Using team device "team0".
Using PID file "/var/run/teamd/team0.pid"
Added loop callback: daemon, 0x16a73c0
Added loop callback: libteam_events, 0x16a73c0
Added loop callback: workq, 0x16a73c0
Failed to get team runner name from config.
Using default team runner "roundrobin".
usock: Using sockpath "/var/run/teamd/team0.sock"
Added loop callback: usock, 0x16a73c0
<ifinfo_list>
 20: team0: e6:e7:a8:55:3c:69: 0 
</ifinfo_list>
<port_list>
</port_list>
1.17 successfully started.
^CGot SIGINT, SIGQUIT or SIGTERM.
Exiting...
Removed loop callback: usock, 0x16a73c0
Removed loop callback: workq, 0x16a73c0
Removed loop callback: libteam_events, 0x16a73c0
Removed loop callback: daemon, 0x16a73c0

On another Ubuntu system I have, with the exact same teamd binaries, but different kernel it works just fine. (This one runs libnl 3.2.21-1).

root@bar:~# uname -a
Linux bar 3.13.0-49-generic #83-Ubuntu SMP Fri Apr 10 20:11:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
root@bar:~# teamd -t team5 -g -n
Using team device "team5".
Using PID file "/var/run/teamd/team5.pid"
Added loop callback: daemon, 0xb733c0
Added loop callback: libteam_events, 0xb733c0
Added loop callback: workq, 0xb733c0
Failed to get team runner name from config.
Using default team runner "roundrobin".
usock: Using sockpath "/var/run/teamd/team5.sock"
Added loop callback: usock, 0xb733c0
<ifinfo_list>
 14: team5: 2a:8e:e4:50:c6:cb: 0 
</ifinfo_list>
<port_list>
 </port_list>
1.17 successfully started.

Could it be due to a netlink protocol change during the two, or a team kernel driver change ?

init-js avatar Jun 19 '15 00:06 init-js

strace output from teamd failure run (out.log): gist.

and the success run on 3.13.0-49-generic: gist2

init-js avatar Jun 19 '15 00:06 init-js

I have the same issue as init-js. I am running Debian Jessie with: Linux debian1 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) x86_64 GNU/Linux

krille55 avatar Oct 15 '15 11:10 krille55

I have the same issue as the original poster. I have two virtual machines, that are nearly identical fresh builds from Ubuntu 14.04.3. I built libteam 1.22 on both, but teamd only launches on one of them. The other machine reports the teamd_init() error and fails. (Note: Both are running the backported 15.04 kernel, version 3.19.0-31-generic)

TJC avatar Nov 04 '15 05:11 TJC

Update: Apologies, it seems one of the VMs is only building the kernel modules for the old 3.13 kernel, not the running 3.19 one. I don't know why (the headers are available) but that seems to be the cause, which is pretty much user error.

TJC avatar Nov 04 '15 05:11 TJC