@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
Server Team, which is subscribed to cloud-init in Ubuntu.
https://bugs.launchpad.net/bugs/810044

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

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

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to