#920655 ganeti-2.15: hardcoded ioctl constants are not arch-independent, breaking network on powerpc

#920655#5
Date:
2019-01-27 23:11:26 UTC
From:
To:
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

#920655#12
Date:
2019-08-28 12:24:40 UTC
From:
To:
Dear submitter,

as the package ganeti-2.15 has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/935880

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)