← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1936823] Re: Azure data source assumes use of dhclient

 

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

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

** 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/1936823

Title:
  Azure data source assumes use of dhclient

Status in cloud-init:
  Expired

Bug description:
  The Azure data source assumes that all Linux distros use dhclient.
  Location of a lease file is hard coded to

  """
  LEASE_FILE = '/var/lib/dhcp/dhclient.eth0.leases'
  """

  and if the file is not found the data source reports errors:

  """
  Failed to read /var/lib/dhcp/dhclient.eth0.leases: [Errno 2] No such file or directory: '/var/lib/dhcp/dhclient.eth0.leases'
  """

  Further, during the cloud-init local stage cloud-init establishes a
  temporary dhclient connect but the lease file is written to a
  temporray location such as:

  """
  /var/tmp/cloud-init/cloud-init-dhcp-sbhredt8/dhcp.leases
  """

  The Azure data source should check if the network is up rather than
  depending on specific markers in the file system left by specific
  implementations for dhcp connections. The kernel sysfs provides more
  reliable methods to detect network connection precense.

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



References