[Lxc-users] Setting up tty correctly / Correctly handling system upgrades

Andreas Feldner lxc-admin at flying-snail.de
Mon Jan 23 19:00:04 UTC 2012


Hi,

I was able to consolidate my home network to one physical machine using lxc - and mostly successful, too.

I'm running Debian testing on both the host and two containers. Network setup including routing, pppoe setup in one container and some required services in another container are running fine.

However, there are a few problems left that I feel I should resolve, but I have not the faintest idea what actually is going wrong.

First of all, in the containers, some tools (e.g. sudo) are claiming a lack of tty:
 sudo: no tty present and no askpass program specified

Strange thing is: the tty device seems to be correctly working: 
# tty
/dev/pts/1
# stty -a
speed 38400 baud; rows 24; columns 80; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke
# stty -F /dev/pts/1 rows 20
  (is working - e.g. vi will format itself to 24 rows after that command)
# echo Hallo > /dev/pts/1
Hallo

I also verified that the lxc configs for the containers seem to contain the correct permissions on pty devices.



Another problem, and here I'm not even sure if this is the right place to ask: apt-get upgrade doesn't work stable in the containers, the configuration of util-linux is running into an error, I assume it has to do with removing inappropriate services by linux-continers:

util-linux (2.20.1-1.2) wird eingerichtet ...
insserv: Service checkroot has to be enabled to start service hwclock
insserv: exiting now!
update-rc.d: error: insserv rejected the script header
dpkg: Fehler beim Bearbeiten von util-linux (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
configured to not write apport reports

I quite lost here: I'm supposed to regularly update the container's installation because it is having its own copies and versions of almost all system tools and packages, right? But how does the linux-container package's magic service disabling work together with system updates? As soon as initscripts or, obviously, until-linux gets updated, the services would have to be disabled again. Am I supposed to run dpkg --reconfigure linux-container after each (relevant) update? Or is some magic doing something equivalent automatically? And with respect to the specific problem I'm facing with util-linux: do I have to manually enable some services before updating? Is this problem related to Debian bug #636851, and if so, how can I cure the existing installation?

Best regards,
Andreas.





More information about the lxc-users mailing list