← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1767166] Re: IBMCloud datasource does not recognize provisioning in debug mode.

 

This bug was fixed in the package cloud-init -
18.2-4-g05926e48-0ubuntu1~16.04.2

---------------
cloud-init (18.2-4-g05926e48-0ubuntu1~16.04.2) xenial-proposed; urgency=medium

  * cherry-pick 6ef92c98: IBMCloud: recognize provisioning environment
    during debug (LP: #1767166)
  * cherry-pick 11172924: IBMCloud: Disable config-drive and nocloud
    only if IBMCloud (LP: #1766401)

 -- Chad Smith <chad.smith@xxxxxxxxxxxxx>  Mon, 30 Apr 2018 15:52:05
-0600

** Changed in: cloud-init (Ubuntu Xenial)
       Status: Fix Committed => Fix Released

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

Title:
  IBMCloud datasource does not recognize provisioning in debug mode.

Status in cloud-init:
  Fix Committed
Status in cloud-init package in Ubuntu:
  Fix Committed
Status in cloud-init source package in Xenial:
  Fix Released
Status in cloud-init source package in Artful:
  Fix Released
Status in cloud-init source package in Bionic:
  Fix Committed
Status in cloud-init source package in Cosmic:
  Fix Committed

Bug description:
  === Begin SRU Template ===
  [Impact]
  Cloud-init is disabled in the provisioning state. If provisioning
  artifacts are left around after debug mode, cloud-init remains disabled
  and doesn't properly configure the instance.

  This issue only affects images that are being tested by IBM before official
  publication.  Once officially published, the images will have a 'production'
  tag, and bug does not reproduce.

  As such, it is believed that a regular end user is not really able to
  produce.

  [Test Case]
  cat > sethostname.yaml <<EOF
  #cloud-config
  runcmd:
   - [sh, '-c', 'cat /proc/uptime > /run/runcmd-ran.txt']
  EOF

  VM_IP=`launch-softlayer --pubkey-file ~/.ssh/id_rsa.pub -u
  sethostname.yaml -i os:xenial | awk '/primary ip/{printf "root@%s",
  $3}'`

  ssh root@$VM_IP -- dpkg-query --show cloud-init;
  ssh root@$VM_IP -- cloud-init status --long;
  ssh root@$VM_IP -- cloud-init analyze show;
  ssh root@$VM_IP -- sh -c '
    mirror=http://archive.ubuntu.com/ubuntu
    echo deb $mirror $(lsb_release -sc)-proposed main | tee /etc/apt/sources.list.d/proposed.list
    apt-get update -q
    apt-get install -qy cloud-init';
  ssh root@$VM_IP -- DEBUG_LEVEL=2 DI_LOG=stderr /usr/lib/cloud-init/ds-identify --force 2>&1 | grep provision
  ssh root@$VM_IP -- cloud-init clean --logs --reboot;
  ssh root@$VM_IP -- egrep 'provisioning|swinstall' /var/log/cloud-init.log
  ssh root@$VM_IP -- grep provision /run/cloud-init/ds-identify.log

  [Regression Potential]
  Regression will still be limited to softlayer instances as code changes are
  limited to softlayer datasource detection in ds-identify and
  DataSourceIBMCloud.

  [Other Info]
  Upstream commit at
    https://git.launchpad.net/cloud-init/commit/?id=44a44ae18

  This bug is currently fixed in bionic-proposed version
  (18.2-27-g6ef92c98-0ubuntu1~18.04.1) and
  cloud-init trunk, so first upload to ubuntu 'cc' will have it fixed.

  === End SRU Template ===

  
  When IBMCloud deploys from a template, artifacts from the
  provisioning stage are normally cleaned up.  Cloud-init relied'
  on that behavior to determine the provisioning boot from the subsequent
  post-provisioning boot.

  However, when testing, the provisioning stage will leave artifacts
  in place (/root/provisioningConfiguration.cfg).  This caused cloud-init
  to permenantly believe that it was in the provisioning stage.

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


References