lxc debian-templates copy_configuration not supplied with $name

Bug #1111613 reported by Francisco Lourenço
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
Medium
Unassigned
Precise
Fix Released
Medium
Stéphane Graber

Bug Description

== Rationale ==
A missing parameter to copy_configuration in lxc-debian is preventing the hostname from being written in quite a few files.

The fix is simply to pass the missing parameter.

== Test case ==
1) lxc-create -t debian -n p1
2) lxc-start -n p1
3) Observe the login prompt " login:" instead of "p1 login:"
4) Stop and remove the container
5) Upgrade lxc
6) Try again and observe "p1 login:"

== Regression potential ==
Can't think of any, we're really just passing the right value instead of an empty string.

------ original bug report -------

Although this bug looks very similar to #1046684 , it is not the same.
With the installed version 0.7.5-3ubuntu66 , I still find the bug existing.

The file, located at /usr/lib/lxc/templates/lxc-debian, has a simple error when copying the configuration and does not provide the "vm" with a name.

Assuming this as a source code: https://launchpad.net/ubuntu/+archive/primary/+files/lxc_0.7.5.orig.tar.gz
The bug is present at /lxc-0.7.5/templates/lxc-debian.in

# line 185
copy_configuration()
{
    path=$1
    rootfs=$2
    name=$3
...
#line 310
copy_configuration $path $rootfs

# the fix / line 310
copy_configuration $path $rootfs $name

My system Details:
Description: Ubuntu 12.04.1 LTS
Release: 12.04
lxc:
  Installed: 0.7.5-3ubuntu66

Just that should do the job
Thanks in advance,
Francisco

Revision history for this message
Francisco Lourenço (francisc-tlourenco) wrote :

Steps to reproduce:
sudo lxc-create -n my_machine -t debian
sudo lxc-start -n my_machine

Expected:
#booting
...
Debian GNU/Linux 6.0 my_machine console

my_machine login:
....

Happens:
#booting
...
Debian GNU/Linux 6.0 console

 login:
....

The fix above fixes the problem.

Changed in lxc (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for reporting this bug. It is fixed in quantal and above. Unfortunately this fix in precise-updates will have to wait until after precise 12.04.2 is released on feb 14.

Changed in lxc (Ubuntu):
status: Confirmed → Fix Released
Changed in lxc (Ubuntu Precise):
status: New → Confirmed
importance: Undecided → Medium
Changed in lxc (Ubuntu Precise):
assignee: nobody → Stéphane Graber (stgraber)
status: Confirmed → In Progress
description: updated
Revision history for this message
Clint Byrum (clint-fewbar) wrote : Please test proposed package

Hello Francisco, or anyone else affected,

Accepted lxc into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/lxc/0.7.5-3ubuntu67 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in lxc (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Stéphane Graber (stgraber) wrote :

All good, tested on precise.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

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

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

---------------
lxc (0.7.5-3ubuntu67) precise-proposed; urgency=low

  * Don't directly write/remove /etc/dnsmasq.d/lxc as that's causing problems
    when removing and reinstalling lxc.
    Instead have dnsmasq ship /etc/dnsmasq.d-available/lxc and create/remove
    a symlink in /etc/dnsmasq.d/. (LP: #1113821)
  * Bump debhelper dependency and add Pre-Depends on newer dpkg for above fix.
  * Allow the container to mount efivars on /sys/firmware/efi/efivars.
    efivars is automatically mounted by mountall on UEFI systems, failure to
    do so leads to a complete boot failure. (LP: #1117589)
  * 0221-make-nonflush-upgrades-robust: be more robust about out of date
    container caches. (LP: #942862)
  * 0207-ubuntu-cloud-fixes.patch: cleanups to lxc-ubuntu-cloud.in
    fix for quantal images that do not have user 'ubuntu' present
    (LP: #1045955)
  * 0301-debian-copy-config: Pass all the arguments to copy_configuration.
    (LP: #1111613)
 -- Stephane Graber <email address hidden> Thu, 07 Feb 2013 13:08:07 -0500

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