lxc-start: wrong terminal size

Bug #987770 reported by B. Clausius
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

1. Create a Precise container with the Ubuntu template:
    sudo lxc-create -n precise -t ubuntu -- -r precise
2. Start the container with lxc-start:
    sudo lxc-start -n precise

The following effects can be observed:
a) Independent of the actual size:
ubuntu@precise:~$ echo $COLUMNS $LINES
80 24
b) Commands like less behave strange if not 80x24.
c) If you type a command that is longer than 80 chars, the cursor jumps to the first column on the same line overwriting the prompt and the command; the ouput of such commands is correct.

If you connect to the container with
    sudo lxc-console -n precise
the effects a-c cannot be observed and work as expected.

Expected: containers started with lxc-create should behave like containers connected to with lxc-console
Workaround:
    sudo lxc-start -n precise -d
    sudo lxc-console -n precise

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: lxc 0.7.5-3ubuntu52
ProcVersionSignature: Ubuntu 3.2.0-23.36-generic 3.2.14
Uname: Linux 3.2.0-23-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu5
Architecture: amd64
Date: Tue Apr 24 12:46:26 2012
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: lxc
UpgradeStatus: Upgraded to precise on 2012-03-31 (24 days ago)

Revision history for this message
B. Clausius (barcc) wrote :
Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 987770] [NEW] lxc-start: wrong terminal size

Thanks for reporting this bug.

Note that you can get 'properly' sized consoles using 'lxc-console'. The
console you get from lxc-start is special, for instance you can also dump
it to a file with -c. If you don't want the initial console at all, you
can avoid taking up your terminal by doing 'lxc-start -n container -d' to
detach the original console, then 'lxc-console -n container' to get a
properly sized console.

The sizing behavior has always been as you describe. I'm not sure whether
to consider it a bug or not - we should discuss it with upstream. In the
meantime, I'll mark this bug confirmed and wishlist priority, so we don't
forget about it.

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

THis is being addressed (by Dwight) upstream. The fix will be in saucy before release.

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

Fix is upstream.

Changed in lxc (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 1.0.0~alpha1-0ubuntu2

---------------
lxc (1.0.0~alpha1-0ubuntu2) saucy; urgency=low

  * Add allow-stderr to autopkgtst restrictions as the Ubuntu template
    uses policy-rc.d to disable some daemons and that causes a message to
    be printed on stderr when the service tries to start.
 -- Stephane Graber <email address hidden> Thu, 12 Sep 2013 13:57:17 -0400

Changed in lxc (Ubuntu):
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.