← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1802598] Re: EphemeralIPv4Network: when device has requested existing network config, but link is down, network setup does not bring link up

 

Tracked in Github Issues as https://github.com/canonical/cloud-
init/issues/3278

** Bug watch added: github.com/canonical/cloud-init/issues #3278
   https://github.com/canonical/cloud-init/issues/3278

** Changed in: cloud-init
       Status: Triaged => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1802598

Title:
  EphemeralIPv4Network: when device has requested existing network
  config, but link is down, network setup does not bring link up

Status in cloud-init:
  Expired

Bug description:
  EphemeralIPv4Network exists in success too early on network devices
  with link down.

  When run against a network interfaces which already has the requested
  ip configuration and routes but hapeens to be "link down",
  EphemeralIPv4Network.bringup_device exits immediately after
  determining that the device has the expected ip address.

  
  EphemeralIPv4Network should instead ensure that all configured aspects of a network interface are properly setup before returning the context.


  Steps to reproduce:

  echo > ephemeral_test.py <<EOF
  #!/usr/bin/python3
  from cloudinit import log
  from cloudinit.net.dhcp import EphemeralDHCPv4
  from cloudinit.cmd.devel import addLogHandlerCLI

  LOG = log.getLogger('ephemeraldhcp')
  addLogHandlerCLI(LOG, log.DEBUG)
  with EphemeralDHCPv4() as lease:
        print('LEASE: %s' % lease)
  EOF
  chmod 755 ephemeral_test.py

  
  lxc launch ubuntu-daily:bionic b1
  lxc file push ephemeral_test.py b1/

  # lxc has already completed configured the device, so we expect to
  only see the following ip commands

  # 'ip', '-family', 'inet', 'addr', 'add' ...
  # 'ip', 'route', 'show', '0.0.0.0/0'
  lxc exec b1 /ephemeral_test.py | grep Running

  
  # bringing down the link, I'd want to see EphemeralIPv4Network performing a call to [ip link set eth0 up ]

  lxc exec b1 ip link eth0 down

  lxc exec b1 /ephemeral_test.py | grep Running

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



References