Unable to create lxc instances with ubuntu-cloud template for release other than precise

Bug #955938 reported by James Page
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
Medium
Serge Hallyn

Bug Description

sudo lxc-create -n oneiric-amd64-template -t ubuntu-cloud -- -r oneiric -a amd64 -S ~/.ssh/id_rsa.pub

No config file specified, using the default config
ubuntu-cloudimg-query is /usr/bin/ubuntu-cloudimg-query
wget is /usr/bin/wget
--2012-03-15 12:00:42-- https://cloud-images.ubuntu.com/server/oneiric/20120311/oneiric-server-cloudimg-amd64-root.tar.gz
Resolving cloud-images.ubuntu.com (cloud-images.ubuntu.com)... 91.189.88.141
Connecting to cloud-images.ubuntu.com (cloud-images.ubuntu.com)|91.189.88.141|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2012-03-15 12:00:42 ERROR 404: Not Found.

failed to execute template 'ubuntu-cloud'
aborted

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: lxc 0.7.5-3ubuntu37 [modified: usr/lib/lxc/templates/lxc-ubuntu-cloud]
ProcVersionSignature: Ubuntu 3.2.0-18.29-generic 3.2.9
Uname: Linux 3.2.0-18-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 1.94.1-0ubuntu2
Architecture: amd64
Date: Thu Mar 15 12:06:30 2012
SourcePackage: lxc
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
James Page (james-page) wrote :
Changed in lxc (Ubuntu):
assignee: nobody → Serge Hallyn (serge-hallyn)
assignee: Serge Hallyn (serge-hallyn) → nobody
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Note that first the ubuntu-cloud template needs to be fixed to not always use precise :) I'm going to fix that in the next upload.

The other problem is that the -root images apparently are only created for precise. I'm assigning this to smoser to get his input on whether that will change. If not, then we'll have to go back to creating our own rootfs from the imgs.

Changed in lxc (Ubuntu):
assignee: nobody → Scott Moser (smoser)
Revision history for this message
Scott Moser (smoser) wrote :

i think that you should probably do logic like this:
 * try to get -rootfs.tar.gz
   * if that fails and release >= precise
      fail
   * else, repack your own

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Sorry, I had thought the -rootfs.tar.gz's existed for all releases.

I'll implement the conditional repacking logic.

Changed in lxc (Ubuntu):
assignee: Scott Moser (smoser) → Serge Hallyn (serge-hallyn)
Changed in lxc (Ubuntu):
importance: High → Medium
Revision history for this message
Scott Moser (smoser) wrote :

If you're touching this, please fix use of 'daily' in the ubuntu-cloudimg-query string. you really should default that to 'released'. The daily images have little or no validation done to them. use 'released'. Optionally allow a '--stream=daily' flag.

also, you should not assume that the password on the image is 'ubuntu', but rather set it with 'chpasswd'.

Also, you might find some fun when dealing with older cloud-init
a.) some of your cloud-config settings might not take
b.) nocloud-net and /var/lib/cloud/data/seed is probably not available in lucid.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 0.7.5-3ubuntu38

---------------
lxc (0.7.5-3ubuntu38) precise; urgency=low

  * 0058-fixup-ubuntu-cloud:
    - fix typo in check for $debug (LP: #955935)
    - Download specified release, not always precise
    - If cloudimg rootfs.tar.gz does not exist, create one from the base
      cloudimg tar.gz. (LP: #955938)
    - Explicitly set ubuntu user's password.
    - Switch from daily to released stream (per smoser's suggestion).
 -- Serge Hallyn <email address hidden> Thu, 15 Mar 2012 17:57:10 -0500

Changed in lxc (Ubuntu):
status: Confirmed → Fix Released
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.