Source: ganeti-2.15
Version: 2.15.2-7+deb9u3
Severity: important
User: [email protected]
Usertags: needed-by-DSA-Team
X-Debbugs-Cc: [email protected]
Hi,
take this small C program:
#include <stdio.h>
#include <sys/ioctl.h>
#include <linux/if_tun.h>
int main() {
printf("0x%x\n", TUNGETFEATURES);
return 0;
}
On x86, it prints 0x800454cf.
On POWER, it prints 0x400454cf (because
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/include/uapi/asm/ioctl.h
overrides the generic values).
FWIW for the other ioctls:
TUNGETIFF = 0x400454d2
TUNSETIFF = 0x800454ca
Ganeti hardcodes the former value in
/usr/share/ganeti/2.15/ganeti/hypervisor/hv_kvm/netdev.py, and starting
a guest fails with:
2019-01-27 22:20:04,596: ganeti-noded pid=56691 WARNING ioctl(TUNGETFEATURES)
failed: [Errno 77] File descriptor in bad state
2019-01-27 22:20:04,596: ganeti-noded pid=56691 ERROR Hypervisor error: Failed
to allocate a new TAP device: [Errno 77] File descriptor in bad state
Traceback (most recent call last):
File "/usr/share/ganeti/2.15/ganeti/backend.py", line 2769, in StartInstance
hyper.StartInstance(instance, block_devices, startup_paused)
File "/usr/share/ganeti/2.15/ganeti/hypervisor/hv_kvm/__init__.py", line
1793, in StartInstance
self._ExecuteKVMRuntime(instance, kvm_runtime, kvmhelp)
File "/usr/share/ganeti/2.15/ganeti/hypervisor/hv_kvm/__init__.py", line
1607, in _ExecuteKVMRuntime
OpenTap(features=features, name=self._GenerateKvmTapName(nic))
File "/usr/share/ganeti/2.15/ganeti/hypervisor/hv_kvm/netdev.py", line 177,
in OpenTap
err)
HypervisorError: Failed to allocate a new TAP device: [Errno 77] File
descriptor in bad state
Cheers,
Julien