stack trace on reboot with NoCloud datasource on reboot

Bug #1592505 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Critical
Scott Moser
cloud-init (Ubuntu)
Fix Released
Critical
Unassigned

Bug Description

initially found when recreating bug 1591181.
But the NoCloud datasource will stacktrace on reboot, with something like:

failed stage init-local#012Traceback (most recent call last):
  File "/usr/bin/cloud-init", line 536, in status_wrapper ret = functor(name, args)
  File "/usr/bin/cloud-init", line 250, in main_init
  init.fetch(existing=existing)
  File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 357, in fetch
  return self._get_data_source(existing=existing)
  File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 252, in _get_data_source
  ds, desc = self._restore_from_checked_cache(existing)
  File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 238, in _restore_from_checked_cache
  ds.check_instance_id(self.cfg)):
  File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceNoCloud.py", line 197, in check_instance_id
  quick_id = _quick_read_instance_id(cmdline_id=self.cmdline_id,
 AttributeError: 'DataSourceNoCloud' object has no attribute

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: cloud-init 0.7.7~bzr1227-0ubuntu1 [modified: usr/lib/python3/dist-packages/cloudinit/sources/DataSourceNoCloud.py]
ProcVersionSignature: Ubuntu 4.4.0-24.43-generic 4.4.10
Uname: Linux 4.4.0-24-generic x86_64
ApportVersion: 2.20.1-0ubuntu4
Architecture: amd64
Date: Tue Jun 14 17:58:25 2016
PackageArchitecture: all
ProcEnviron:
 TERM=linux
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Scott Moser (smoser) wrote :
summary: - stack trace on reboot with NoCloud datasource
+ stack trace on reboot with NoCloud datasource on reboot
Revision history for this message
Scott Moser (smoser) wrote :

This was recreatable in xenial lxc (no yakkety lxc images yet) with:

$ lxc launch xenial x1
$ sleep 10
$ lxc exec x1 -- sh -c 'add-apt-repository -y ppa:cloud-init-dev/daily && apt-get update && apt-get install cloud-init'
$ lxc exec x1 -- sh -c '( cd /var/lib/cloud/ && for d in *; do [ "$d" = "seed" ] || rm -Rf $d; done ); rm -Rf /var/log/cloud*'
$ lxc exec x1 reboot

the above basically cleans the image making it think its first boot.
Then, one more time:

$ lxc exec x1 reboot

$ lxc exec x1 grep WARN /var/log/cloud-init.log

Scott Moser (smoser)
Changed in cloud-init (Ubuntu):
status: New → Confirmed
importance: Undecided → Critical
Changed in cloud-init:
status: New → Confirmed
importance: Undecided → Critical
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.7.7~bzr1242-0ubuntu1

---------------
cloud-init (0.7.7~bzr1242-0ubuntu1) yakkety; urgency=medium

  * d/control: Build-Depends on python3-unittest2
  * New upstream snapshot.
    - DataSourceNoCloud: fix stack trace on reboot, default to dsmode=net
      (LP: #1592505)
    - support network rendering to sysconfig (for centos and RHEL)
    - fix errors reported by pylint
    - move 'main' into cloudinit.cmd for easier testing. use
      setuptools entry_points for creating executable.
    - Remove trailing dot from GCE metadata URL (LP: #1581200)
    - Change missing Cheetah log warning to debug [Andrew Jorgensen]
    - make networking config provided in system config override datasource.
      (LP: #1590104)

 -- Scott Moser <email address hidden> Thu, 16 Jun 2016 00:07:12 -0400

Changed in cloud-init (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Scott Moser (smoser) wrote :

fix committed in revno 1241

Changed in cloud-init:
assignee: nobody → Scott Moser (smoser)
status: Confirmed → Fix Committed
Scott Moser (smoser)
Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.