Open dvzrv opened 6 years ago
Hello.
Thank you for filling this issue. In points:
ifconfig
and ip a
commands executed in chroot?Have a nice day. Lumír
Hey @frenzymadness! Thanks for looking into this.
ifconfig:
enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.10.23.150 netmask 255.255.255.0 broadcast 10.10.23.255
inet6 fe80::3e97:eff:fede:1de7 prefixlen 64 scopeid 0x20<link>
ether 3c:97:0e:de:1d:e7 txqueuelen 1000 (Ethernet)
RX packets 22266 bytes 20715791 (19.7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 14937 bytes 1750192 (1.6 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 20 memory 0xb4a00000-b4a20000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 29261 bytes 4823456 (4.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 29261 bytes 4823456 (4.6 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.23.1.2 netmask 255.255.255.0 broadcast 172.23.1.255
inet6 fe80::d854:ebff:fe99:a603 prefixlen 64 scopeid 0x20<link>
ether da:54:eb:99:a6:03 txqueuelen 100 (Ethernet)
RX packets 5466 bytes 2708136 (2.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4743 bytes 338255 (330.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp3s0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 5c:51:4f:9e:de:af txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ip a:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 3c:97:0e:de:1d:e7 brd ff:ff:ff:ff:ff:ff
inet 10.10.23.150/24 brd 10.10.23.255 scope global enp0s25
valid_lft forever preferred_lft forever
inet 10.10.23.10/24 brd 10.10.23.255 scope global secondary dynamic enp0s25
valid_lft 312sec preferred_lft 312sec
inet6 fe80::3e97:eff:fede:1de7/64 scope link
valid_lft forever preferred_lft forever
3: wlp3s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 5c:51:4f:9e:de:af brd ff:ff:ff:ff:ff:ff
4: tap0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 100
link/ether da:54:eb:99:a6:03 brd ff:ff:ff:ff:ff:ff
inet 172.23.1.2/24 brd 172.23.1.255 scope global tap0
valid_lft forever preferred_lft forever
inet6 fe80::d854:ebff:fe99:a603/64 scope link
valid_lft forever preferred_lft forever
Now it is obvious where the problem comes from. ifconfig
is deprecated and it cannot show more than one IPv4 address. There is one way how to do it but it requires that each secondary IPv4 address has to have a label (known as subinterface) associated. For example enp0s25:0. But we cannot change setting of your environment.
In the test suite, ifconfig
is used as a secondary source for info about network interfaces because we have to have something we can compare results from ethtool with.
The solution here is obvious. We can implement Python wrapper for ip
command which is not obsolete and which can provide all necessary information about network interfaces with all new kernel features. But honestly, I don't think that it worth. We became maintainers of python-ethtool to make it Python 3 compatible and I don't think that we have enough time to make that big change and implement new stuff.
@hroncok @Sanqui What do you think guys?
I'll try to find some way to fix all your issues.
Adding new features to python-ethtool is very unlikely.
Hello. I've implemented a fix for first two issues. Tests now expecting being run without root privileges. Take a look or try it if you want.
I'll take a look also at the last problem. We don't have time to implement ip
wrapper but we might find another solution.
Helloes! I'm currently pushing python-ethtool to Arch Linux's [community]. On Arch, packages are built in a clean chroot (to ensure package and dependency integrity). There however, the tests fail:
Within the chroot, the user, that's building the package is not allowed root privileges. This might lead to the tests failing, but maybe you can provide some more insight? I'd like to be able to use the tests during packaging for python{2,3}.