no console on precise containers

Bug #913952 reported by Serge Hallyn
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
High
Unassigned
util-linux (Debian)
Fix Released
Unknown
util-linux (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

When a precise container is started, 'lxc-start -n p1', the /dev/console getty does not work. The other consoles ('lxc-console -n p1 -t [1-4]') do.

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

There are 3 causes, all stemming from commit 3aa6b68f7e19fa3e1c2bba75bee921a98b7b46af in upstream util-linux.

1. getty no longer accepts a full pathname. It prepends '/dev' to the string it uses to open the file. /etc/init/console.conf in lxcguest passes /dev/console. Rather than changing getty, this can be changed in console.conf by passing just 'console'.

2. ioctl(fd, TIOCSCTTY) is called twice, and returns -EPERM for the container's console. Upstream commit 1593b134ebf596ae7a2b1e73f2dcc8c4e7febddd fixes that by change log_err to log_warn.

3. a new call to tcsetpgrp is added, which returns Inappropriate ioctl for device. This is still present in upstream util-linux, but changing the following log_err to log_warn allows getty to succeed.

With each of these changes, precise containers have a console again.

Changed in lxc (Ubuntu):
status: New → Triaged
importance: Undecided → High
affects: lxc (Debian) → util-linux (Debian)
Changed in util-linux (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

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

  [ Robie Basak ]
  * debian/patches/0015-ubuntu-templ-use-updates.patch: use ports.ubuntu.com
    in sources.list for alternative architectures (LP: #820715).
  * debian/patches/0015-ubuntu-templ-use-updates.patch: dist-upgrade in an
    isolated environment to avoid leaving a bind mount behind (LP: #913877).
  * debian/lxc.{default,init}: call ifconfig with explicit netmask
    (LP: #913727).

  [ Serge Hallyn ]
  * debian/lxc.default: update the MIRROR example - using 'localhost'
    fails for updates after the container has been started.
  * debian/lxcguest.console.upstart: pass 'console' not '/dev/console' to
    getty. (LP: #913952)
  * debian/patches/0015-ubuntu-templ-use-updates.patch: at post_process(),
    copy host's /etc/resolv.conf (which may have changed) into chroot before
    apt-get actions, and always do a apt-get update before installing lxcguest,
    as the package version may have changed in the archive. (LP: #914155)
  * 0016-nested-cgroups.patch: nest container cgroups under the host's
    init cgroup. (LP: #901482)
  * 0017-pull-upstream-fedora-template.patch: move to the upstream
    lxc-fedora template (LP: #881903)
  * 0018-make-lxc-ps-search-proc.patch: work when cgroups are mounted with
    '-n'.
  * debian/patches/0019-fix-lxc-ls-nested-cgroups.patch: fix lxc-ls to
    handle the support for nested cgroups. (pull this into previous
    commit msg before pushing)
 -- Serge Hallyn <email address hidden> Tue, 10 Jan 2012 18:51:45 +0000

Changed in lxc (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Marking this invalid for util-linux because, mysteriously, I can no longer reproduce it.

Changed in util-linux (Ubuntu):
status: New → Invalid
Changed in util-linux (Debian):
status: New → Fix Released
Revision history for this message
Damiens ROBERT (damiensrobert) wrote :

Hi,
Here is the version of lxc I use :

root@00000043:/data/sop/src/vsop# dpkg -l lxc
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-===============================================-===============================================-==============================================================================================================
ii lxc 0.7.5-3ubuntu52 Linux containers userspace tools

And the version of util-linux I'm using :

root@00000043:/data/sop/src/vsop# dpkg -l util-linux
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-===============================================-===============================================-==============================================================================================================
ii util-linux 2.20.1-1ubuntu3 Miscellaneous system utilities

And I still have the bug ...

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.