← Back to team overview

debcrafters-packages team mailing list archive

[Bug 1492621] Re: Cannot start VMs without routable IPv4 address

 

Reviewing this bug, I am not sure what we want to do here. As stated in
the first comment 13 years ago, when the spice server starts, it uses
AI_ADDRCONFIG with getaddrinfo which prevents it from binding to the
IPv4 loopback address "if the local system doesn't have at least one
IPv4 configured" (getaddrinfo(3)). Note that the reverse is also true
(IPv6 loopback address with no IPv6 configured).

Thus, if the user or the libvirt config tries to bind to 127.0.0.1 on a
IPv6 only system, it will fail. Is it really a bug?

If this is really a problem, I can see two possible solutions:
 1. patch glibc and getaddrinfo to not ignore the loopback address when using AI_ADDRCONFIG (as suggested in the first comment above)
 2. patch spice itself to detect if the address specified is a loopback interface address and don't use AI_ADDRCONFIG in this case

I haven't checked yet if any of these changes has already been proposed
upstream.

-- 
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to glibc in Ubuntu.
https://bugs.launchpad.net/bugs/1492621

Title:
  Cannot start VMs without routable IPv4 address

Status in GLibC:
  Confirmed
Status in glibc package in Ubuntu:
  Confirmed
Status in qemu package in Ubuntu:
  Confirmed

Bug description:
  qemu will not start VMs using spice or vnc displays unless there is a
  routable IPv4 address on the machine, even though the error relates to
  127.0.0.1

  root@athens:~# ip addr
  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
      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: em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master ovs-system state UP group default qlen 1000
      link/ether a4:ba:db:32:4c:6b brd ff:ff:ff:ff:ff:ff
      inet6 fe80::a6ba:dbff:fe32:4c6b/64 scope link
         valid_lft forever preferred_lft forever
  3: em2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master ovs-system state UP group default qlen 1000
      link/ether a4:ba:db:32:4c:6c brd ff:ff:ff:ff:ff:ff
      inet6 fe80::a6ba:dbff:fe32:4c6c/64 scope link
         valid_lft forever preferred_lft forever
  4: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default
      link/ether a6:01:71:d4:b2:71 brd ff:ff:ff:ff:ff:ff
  5: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default
      link/ether a4:ba:db:32:4c:6b brd ff:ff:ff:ff:ff:ff
      inet6 2606:a000:a461:4500:a6ba:dbff:fe32:4c6b/64 scope global mngtmpaddr dynamic
         valid_lft 86292sec preferred_lft 14292sec
      inet6 fe80::c03d:22ff:fea5:3034/64 scope link
         valid_lft forever preferred_lft forever
  root@athens:~# virsh start icarus
  error: Failed to start domain icarus
  error: internal error: process exited while connecting to monitor: ((null):4086): Spice-Warning **: reds.c:2330:reds_init_socket: getaddrinfo(127.0.0.1,5900): Address family for hostname not supported
  2015-09-05T17:43:39.911871Z qemu-system-x86_64: failed to initialize spice server

  root@athens:~# dhclient br0
  root@athens:~# ip addr
  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
      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: em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master ovs-system state UP group default qlen 1000
      link/ether a4:ba:db:32:4c:6b brd ff:ff:ff:ff:ff:ff
      inet6 fe80::a6ba:dbff:fe32:4c6b/64 scope link
         valid_lft forever preferred_lft forever
  3: em2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master ovs-system state UP group default qlen 1000
      link/ether a4:ba:db:32:4c:6c brd ff:ff:ff:ff:ff:ff
      inet6 fe80::a6ba:dbff:fe32:4c6c/64 scope link
         valid_lft forever preferred_lft forever
  4: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default
      link/ether a6:01:71:d4:b2:71 brd ff:ff:ff:ff:ff:ff
  5: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default
      link/ether a4:ba:db:32:4c:6b brd ff:ff:ff:ff:ff:ff
      inet 172.31.3.106/24 brd 172.31.3.255 scope global br0
         valid_lft forever preferred_lft forever
      inet6 2606:a000:a461:4500:a6ba:dbff:fe32:4c6b/64 scope global mngtmpaddr dynamic
         valid_lft 86335sec preferred_lft 14335sec
      inet6 fe80::a6ba:dbff:fe32:4c6b/64 scope link
         valid_lft forever preferred_lft forever
  root@athens:~# virsh start icarus
  Domain icarus started

  ProblemType: Bug
  DistroRelease: Ubuntu 15.04
  Package: qemu-system-x86 1:2.2+dfsg-5expubuntu9.4
  ProcVersionSignature: Ubuntu 3.19.0-26.28-generic 3.19.8-ckt4
  Uname: Linux 3.19.0-26-generic x86_64
  ApportVersion: 2.17.2-0ubuntu1.3
  Architecture: amd64
  Date: Sat Sep  5 13:46:23 2015
  InstallationDate: Installed on 2015-08-29 (6 days ago)
  InstallationMedia: Ubuntu-Server 15.04 "Vivid Vervet" - Release amd64 (20150422)
  MachineType: Dell Inc. PowerEdge T310
  ProcEnviron:
   TERM=xterm
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.19.0-26-generic.efi.signed root=/dev/mapper/vg_athens-lv_root ro
  SourcePackage: qemu
  UdevLog: Error: [Errno 2] No such file or directory: '/var/log/udev'
  UpgradeStatus: No upgrade log present (probably fresh install)
  dmi.bios.date: 09/06/2013
  dmi.bios.vendor: Dell Inc.
  dmi.bios.version: 1.12.0
  dmi.board.name: 0MNFTH
  dmi.board.vendor: Dell Inc.
  dmi.board.version: A00
  dmi.chassis.type: 17
  dmi.chassis.vendor: Dell Inc.
  dmi.modalias: dmi:bvnDellInc.:bvr1.12.0:bd09/06/2013:svnDellInc.:pnPowerEdgeT310:pvr:rvnDellInc.:rn0MNFTH:rvrA00:cvnDellInc.:ct17:cvr:
  dmi.product.name: PowerEdge T310
  dmi.sys.vendor: Dell Inc.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glibc/+bug/1492621/+subscriptions