[Bug 810044] Re: cloud-init will have race conditions for cloud-config with multiple network adapters

Scott Moser smoser at canonical.com
Mon Aug 1 15:34:08 UTC 2011


@clint,
  I think there is an issue with the branch you've been working on when mappings are used.
  I've fixed my branch to use the first token of /var/run/network/ifstate rather than the second.  Experimentation showed that the first field will be the physical interface and the second would be the virtual.  'auto' lines in interfaces reference virtual.

  That would seem to be fine, but my issue right now is that 'ifquery
--list' does not show any interfaces that have had mappings done.
Sadly:

$ cat /etc/network/interfaces
auto eth0
mapping eth0
  script /usr/local/bin/print-last
  map AUTO xdhcp
  map MANUAL xmanual
iface xdhcp inet dhcp
iface xmanual inet static
  address 192.168.42.1
  netmask 255.255.255.0

$ cat /usr/local/bin/print-last
#!/bin/sh
while read name val; do last=$val; done
echo $last

$ sudo ifquery --list
lo
Ignoring unknown interface eth0=eth0.

$ sudo ifup eth0
$ cat /var/run/network/ifstate 
lo=lo
eth0=xmanual

$ sudo ifquery --list
lo
Ignoring unknown interface eth0=eth0.

The 'Ignoring' message goes to stderr.

The issue, is that with the current implementation, the 'static-network-
up' would fire as soon as 'lo' was up. Because the 'ifquery --list' is
not providing a complete list to stdout as expected.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ifupdown in Ubuntu.
https://bugs.launchpad.net/bugs/810044

Title:
  cloud-init will have race conditions for cloud-config with multiple
  network adapters

Status in Init scripts for use on cloud images:
  Triaged
Status in “cloud-init” package in Ubuntu:
  Confirmed
Status in “ifupdown” package in Ubuntu:
  New

Bug description:
  right now, if there are multiple network adapters in a system, cloud-
  init coudl start running cloud-config jobs before network was really
  up.

  That means installing additional packages could be attempted before
  the network required was up.  cloud-config could start as early as the
  first network coming up.

  ProblemType: Bug
  DistroRelease: Ubuntu 11.10
  Package: cloud-init 0.6.1-0ubuntu11
  ProcVersionSignature: User Name 3.0-3.4-virtual 3.0.0-rc5
  Uname: Linux 3.0-3-virtual x86_64
  Architecture: amd64
  Date: Wed Jul 13 17:46:07 2011
  PackageArchitecture: all
  ProcEnviron:
   PATH=(custom, user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: cloud-init
  UpgradeStatus: No upgrade log present (probably fresh install)

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/810044/+subscriptions




More information about the foundations-bugs mailing list