← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1717147] [NEW] cloud-init 0.7.9 fails for CentOS 7.4 in Cloudstack

 

Public bug reported:

Environment:
CentOS 7.4, cloud-init-0.7.9-9.el7.centos.2.x86_64

Problem (quick):
CentOS 7.4 builds on Cloudstack 4.8 don't run cloud-init because the newer version of cloud-init doesn't appear to like the way the dhclient lease file is named.

Problem (long):

I've just built a CentOS 7.4 instance in one of my CloudStack 4.8
clusters.  Unfortunately, cloud-init fails with the following in snippet
in /var/log/cloud-init.log:

2017-09-13 18:53:00,118 - __init__.py[DEBUG]: Seeing if we can get any data from <class 'cloudinit.sources.DataSourceCloudStack.DataSourceCloudStack'>
2017-09-13 18:53:00,118 - DataSourceCloudStack.py[DEBUG]: Using /var/lib/dhclient lease directory
2017-09-13 18:53:00,118 - DataSourceCloudStack.py[DEBUG]: No lease file found, using default gateway

Where it then tries to use the default route to download userdata.  The
problem is that we're not using the Cloudstack VR as a default router,
so I expected it to parse /var/lib/dhclient/dhclient--eth0.lease for the
"dhcp-server-identifier" line.

Theory as to cause:
I believe that this change (https://github.com/cloud-init/cloud-init/commit/aee0edd93cb4d78b5e0d1aec71e977aabf31cdd0#diff-5bc9de2bb7889d66205845400c7cf99b) breaks cloud-init beyond the 7.3-distributed cloud-0.7.5 when 7.4 includes 0.7.9-9.

Fix:

Changing it from "dhclient." to "dhclient-" in /usr/lib/python2.7/site-
packages/cloudinit/sources/DataSourceCloudStack.py on the running box
with an installed RPM did the trick theoretically (after removing the
pyc and pyo files, of course).

This *can* be patched around by RedHat/CentOS (and hopefully will), but
I figure it might be better to take it straight upstream.

** Affects: cloud-init
     Importance: Undecided
         Status: New

-- 
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/1717147

Title:
  cloud-init 0.7.9 fails for CentOS 7.4 in Cloudstack

Status in cloud-init:
  New

Bug description:
  Environment:
  CentOS 7.4, cloud-init-0.7.9-9.el7.centos.2.x86_64

  Problem (quick):
  CentOS 7.4 builds on Cloudstack 4.8 don't run cloud-init because the newer version of cloud-init doesn't appear to like the way the dhclient lease file is named.

  Problem (long):

  I've just built a CentOS 7.4 instance in one of my CloudStack 4.8
  clusters.  Unfortunately, cloud-init fails with the following in
  snippet in /var/log/cloud-init.log:

  2017-09-13 18:53:00,118 - __init__.py[DEBUG]: Seeing if we can get any data from <class 'cloudinit.sources.DataSourceCloudStack.DataSourceCloudStack'>
  2017-09-13 18:53:00,118 - DataSourceCloudStack.py[DEBUG]: Using /var/lib/dhclient lease directory
  2017-09-13 18:53:00,118 - DataSourceCloudStack.py[DEBUG]: No lease file found, using default gateway

  Where it then tries to use the default route to download userdata.
  The problem is that we're not using the Cloudstack VR as a default
  router, so I expected it to parse /var/lib/dhclient/dhclient--
  eth0.lease for the "dhcp-server-identifier" line.

  Theory as to cause:
  I believe that this change (https://github.com/cloud-init/cloud-init/commit/aee0edd93cb4d78b5e0d1aec71e977aabf31cdd0#diff-5bc9de2bb7889d66205845400c7cf99b) breaks cloud-init beyond the 7.3-distributed cloud-0.7.5 when 7.4 includes 0.7.9-9.

  Fix:

  Changing it from "dhclient." to "dhclient-" in /usr/lib/python2.7
  /site-packages/cloudinit/sources/DataSourceCloudStack.py on the
  running box with an installed RPM did the trick theoretically (after
  removing the pyc and pyo files, of course).

  This *can* be patched around by RedHat/CentOS (and hopefully will),
  but I figure it might be better to take it straight upstream.

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


Follow ups