| Summary: | Sanity tests fail due to permission problem | ||
|---|---|---|---|
| Product: | [Infrastructure] AutoBuilder | Reporter: | Bill Randle <bill.randle> |
| Component: | autobuilder | Assignee: | Bill Randle <bill.randle> |
| Status: | RESOLVED FIXED | QA Contact: | Libertad <libertad.gonzalez.de.la.cruz> |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | infras.ab.watcher, Infras.watcher, jose.perez.carranza, pidge, sgw |
| Version: | 2.2 | ||
| Target Milestone: | 2.2 M3 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Bill Randle
2016-07-01 19:22:20 UTC
This is a portion of the strace log for the qemu-arm startup:
open("/dev/net/tun", O_RDWR) = 9
ioctl(9, TUNGETFEATURES, 0x7ffcee89ea6c) = 0
ioctl(9, TUNSETVNETHDRSZ, 0x7ffcee89ea68) = -1 EBADFD (File descriptor in bad state)
ioctl(9, TUNSETIFF, 0x7ffcee89ea70) = -1 EPERM (Operation not permitted)
close(9) = 0
fstat(2, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 2), ...}) = 0
write(2, "qemu-system-i386: -net tap,vlan="..., 136qemu-system-i386: -net tap,vlan=0,ifname=tap0,script=no,downscript=no: could not configure /dev/net/tun (tap0): Operation not permitted
) = 136
It is the TUNSETIFF ioctl that is causing the problem.
It turns out the kernel tun driver looks for the user id AND group id of the process calling that ioctl to match. In our setup, the tap devices are owned by uid 6000 (pokybuild) and group 100 (users). The pokybuild user was not part of the users group.
Added pokybuild to the users group and restarted the workers and now the sajnity test is working.
|