← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1160462] Re: Don't run resizefs hook during installation of an LXC container with cloud-init

 

This bug was fixed in the package cloud-init - 0.7.2~bzr804-0ubuntu1

---------------
cloud-init (0.7.2~bzr804-0ubuntu1) raring; urgency=low

  * New upstream snapshot.
    * use python-requests rather than urllib2 for http (LP: #1067888)
    * handle failure of resizefs better.  Specifically, do not show
      warnings or stack trace in lxc (LP: #1160462)
 -- Scott Moser <smoser@xxxxxxxxxx>   Wed, 27 Mar 2013 10:04:41 -0400

** Changed in: cloud-init (Ubuntu)
       Status: Triaged => 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/1160462

Title:
  Don't run resizefs hook during installation of an LXC container with
  cloud-init

Status in Init scripts for use on cloud images:
  Fix Committed
Status in “cloud-init” package in Ubuntu:
  Fix Released

Bug description:
  Raring AMD64
  cloud-init 0.7.2~bzr795-0ubuntu1

  During the provisioning of an LXC guest with the template ubuntu-
  cloud, cloud-init executes the hook resizefs and fails with:

  2013-03-26 15:11:09,545 - util.py[DEBUG]: Running resizefs (<module 'cloudinit.config.cc_resizefs' from '/usr/lib/python2.7/dist-packages/cloudinit/config/cc_resizefs.pyc'>) failed
  Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/cloudinit/stages.py", line 553, in _run_modules
      cc.run(run_name, mod.handle, func_args, freq=freq)
    File "/usr/lib/python2.7/dist-packages/cloudinit/cloud.py", line 63, in run
      return self._runners.run(name, functor, args, freq, clear_on_fail)
    File "/usr/lib/python2.7/dist-packages/cloudinit/helpers.py", line 197, in run
      results = functor(*args)
    File "/usr/lib/python2.7/dist-packages/cloudinit/config/cc_resizefs.py", line 78, in handle
      if not stat.S_ISBLK(os.stat(devpth).st_mode):
  OSError: [Errno 2] No such file or directory: '/dev/sdb1'

  It shouldn't try to resize the hard drive and there should be an error
  handler in the code.

  TEST CASE:
  1. Create a user-data file with the following content:
  ====8<========8<========8<========8<========8<====
  #cloud-config
  locale: en_US.UTF-8

  password: ubuntu
  chpasswd: { expire: False }
  ssh_pwauth: True

  ssh_authorized_keys:
   - SOMEPUBKEY

  apt_sources:
   - source: deb http://archive.ubuntu.com/ubuntu raring restricted multiverse
   - source: deb-src http://archive.ubuntu.com/ubuntu raring restricted multiverse

  byobu_by_default: system

  packages:
   - eatmydata
   - autopkgtest
   - dpkg-dev
   - pbuilder
   - bzr

  runcmd:
   - [sh, -xc, "echo '127.0.1.1 autopkgtest' >> /etc/hosts" ]
  ====>8========>8========>8========>8========>8====

  2. On an AMD64 host provision an LXC guest with the command (replace user-data by the path to the user-data file you created above)
    $ sudo lxc-create -n raring-armhf-20130326 -t ubuntu-cloud -- -r raring -a amd64 -s daily -u user-data

  3. Start the container and wait
    $ sudo lxc-start -n raring-armhf-20130326

  ProblemType: Bug
  DistroRelease: Ubuntu 13.04
  Package: cloud-init (not installed)
  ProcVersionSignature: Ubuntu 3.8.0-13.23-generic 3.8.3
  Uname: Linux 3.8.0-13-generic x86_64
  ApportVersion: 2.9.2-0ubuntu4
  Architecture: amd64
  Date: Tue Mar 26 17:06:46 2013
  MarkForUpload: True
  ProcEnviron:
   TERM=xterm
   PATH=(custom, no user)
   XDG_RUNTIME_DIR=<set>
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: cloud-init
  UpgradeStatus: Upgraded to raring on 2012-01-31 (419 days ago)

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