Re: [Lxc-users] kramic on maverick
Quoting Trent W. Buck (trentb...@gmail.com): Serge E. Hallyn serge.hal...@canonical.com writes: Quoting Trent W. Buck (t...@cybersource.com.au): I encountered, isolated, and worked around this issue. Symptom: gettys don't start in the container. runlevel(8) reports unknown instead of N 2. Problem: ifupdown 0.6.8ubuntu29.1 introduces this change: ifupdown (0.6.8ubuntu29.1) lucid-proposed; urgency=low * debian/ifupdown.network-interface.conf: Bring up lo manually, so that it comes up even if /etc/network/interfaces is broken (LP: #512253). * debian/ifupdown.upstart.if-up: Don't emit a duplicate net-device-up event for lo here, as network-interface.conf will have taken care of it. For some reason, upstart DOES NOT generate the event, so when this Purely guessing, but I assume that normally the kernel creates that uevent when lo gets set up? But with the container, lo is created (and uevent sent) before the container's upstart is running? I have no idea. Any diagnostics commands you'd like me to run? No, that was a question for the people who would know off the top of their heads (Dan Smith, Daniel Lezcano, or Eric Biederman). Else I'll go look in the code. -serge -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] kramic on maverick
Serge E. Hallyn serge.hal...@canonical.com writes: Quoting Trent W. Buck (t...@cybersource.com.au): I encountered, isolated, and worked around this issue. Symptom: gettys don't start in the container. runlevel(8) reports unknown instead of N 2. Problem: ifupdown 0.6.8ubuntu29.1 introduces this change: ifupdown (0.6.8ubuntu29.1) lucid-proposed; urgency=low * debian/ifupdown.network-interface.conf: Bring up lo manually, so that it comes up even if /etc/network/interfaces is broken (LP: #512253). * debian/ifupdown.upstart.if-up: Don't emit a duplicate net-device-up event for lo here, as network-interface.conf will have taken care of it. For some reason, upstart DOES NOT generate the event, so when this Purely guessing, but I assume that normally the kernel creates that uevent when lo gets set up? But with the container, lo is created (and uevent sent) before the container's upstart is running? I have no idea. Any diagnostics commands you'd like me to run? It's important to know where the event is supposed to come from, because we're hoping to have the same set of upstart scripts work both in a container and on a native host. So we'll want to find a general solution to this - even if it has to be some lxc.conf which only runs if it is in a container, and fakes certain events it knows won't otherwise happen. I'm happy to help with that, but my top priority is make it work at all in lucid not make it work properly in ubuntu+1 :-) -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] kramic on maverick
I encountered, isolated, and worked around this issue. Symptom: gettys don't start in the container. runlevel(8) reports unknown instead of N 2. Problem: ifupdown 0.6.8ubuntu29.1 introduces this change: ifupdown (0.6.8ubuntu29.1) lucid-proposed; urgency=low * debian/ifupdown.network-interface.conf: Bring up lo manually, so that it comes up even if /etc/network/interfaces is broken (LP: #512253). * debian/ifupdown.upstart.if-up: Don't emit a duplicate net-device-up event for lo here, as network-interface.conf will have taken care of it. For some reason, upstart DOES NOT generate the event, so when this change disabled the duplicate event, upstart never realizes the lo iface is up, and never enters runlevel S. Workaround: manually generate the event immediately on boot. # cat /srv/lxc/template-amd64/etc/init/lxc.conf description LXC vs. Upstart workarounds start on startup task script initctl emit -n stopped JOB=udevtrigger initctl emit -n started JOB=udev # This one is needed for broken ifupdown NMU 0.6.8ubuntu29.1 initctl emit -n net-device-up IFACE=lo LOGICAL=lo ADDRFAM=inet METHOD=loopback end script -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] kramic on maverick
Daniel Lezcano wrote, On 2010. 10. 26. 15:06: The problem was not with the console, but ssh and other services, which supposed to be started by the rc system. After some hours I could get it work. I downloaded an openvz template and made a diff and I made the needed changes to the lxc template. What are these changes ? This is a diff to between a working and a not working /etc/init directory. Also this is contained in fstab: proc /proc procdefaults00 none /dev/ptsdevpts rw 00 Most of the changes are dpkg-divert, I think these are the keys of the solutions: lxc.conf networking.conf rs-sysinit.conf Bye, tamas diff -urN 1/rootfs/etc/init/control-alt-delete.conf brainsum1/rootfs/etc/init/control-alt-delete.conf --- 1/rootfs/etc/init/control-alt-delete.conf 2009-10-15 21:19:27.0 +0200 +++ brainsum1/rootfs/etc/init/control-alt-delete.conf 1970-01-01 01:00:00.0 +0100 @@ -1,12 +0,0 @@ -# control-alt-delete - emergency keypress handling -# -# This task is run whenever the Control-Alt-Delete key combination is -# pressed, and performs a safe reboot of the machine. - -descriptionemergency keypress handling -author Scott James Remnant sc...@netsplit.com - -start on control-alt-delete - -task -exec shutdown -r now Control-Alt-Delete pressed diff -urN 1/rootfs/etc/init/control-alt-delete.conf.distrib brainsum1/rootfs/etc/init/control-alt-delete.conf.distrib --- 1/rootfs/etc/init/control-alt-delete.conf.distrib 1970-01-01 01:00:00.0 +0100 +++ brainsum1/rootfs/etc/init/control-alt-delete.conf.distrib 2009-10-15 21:19:27.0 +0200 @@ -0,0 +1,12 @@ +# control-alt-delete - emergency keypress handling +# +# This task is run whenever the Control-Alt-Delete key combination is +# pressed, and performs a safe reboot of the machine. + +descriptionemergency keypress handling +author Scott James Remnant sc...@netsplit.com + +start on control-alt-delete + +task +exec shutdown -r now Control-Alt-Delete pressed diff -urN 1/rootfs/etc/init/hwclock.conf brainsum1/rootfs/etc/init/hwclock.conf --- 1/rootfs/etc/init/hwclock.conf 2009-10-23 06:26:12.0 +0200 +++ brainsum1/rootfs/etc/init/hwclock.conf 1970-01-01 01:00:00.0 +0100 @@ -1,19 +0,0 @@ -# hwclock - adjust system clock and timezone -# -# The hwclock task adjusts the system clock when the hardware clock is -# set to localtime (e.g. when dual-booting with Windows), and also -# ensures that the system timezone is set so that timestamps are written -# to FAT devices. - -descriptionadjust system clock and timezone - -start on starting mountall - -task - -script -. /etc/default/rcS -[ $UTC = yes ] tz=--utc || tz=--localtime -[ $BADYEAR = yes ] badyear=--badyear -exec hwclock --systz $tz --noadjfile $badyear -end script diff -urN 1/rootfs/etc/init/hwclock.conf.distrib brainsum1/rootfs/etc/init/hwclock.conf.distrib --- 1/rootfs/etc/init/hwclock.conf.distrib 1970-01-01 01:00:00.0 +0100 +++ brainsum1/rootfs/etc/init/hwclock.conf.distrib 2009-10-23 06:26:12.0 +0200 @@ -0,0 +1,19 @@ +# hwclock - adjust system clock and timezone +# +# The hwclock task adjusts the system clock when the hardware clock is +# set to localtime (e.g. when dual-booting with Windows), and also +# ensures that the system timezone is set so that timestamps are written +# to FAT devices. + +descriptionadjust system clock and timezone + +start on starting mountall + +task + +script +. /etc/default/rcS +[ $UTC = yes ] tz=--utc || tz=--localtime +[ $BADYEAR = yes ] badyear=--badyear +exec hwclock --systz $tz --noadjfile $badyear +end script diff -urN 1/rootfs/etc/init/hwclock-save.conf brainsum1/rootfs/etc/init/hwclock-save.conf --- 1/rootfs/etc/init/hwclock-save.conf 2009-10-23 06:26:12.0 +0200 +++ brainsum1/rootfs/etc/init/hwclock-save.conf 1970-01-01 01:00:00.0 +0100 @@ -1,17 +0,0 @@ -# hwclock-save - save system clock to hardware clock -# -# This task saves the time from the system clock back to the hardware -# clock on shutdown. - -descriptionsave system clock to hardware clock - -start on runlevel [06] - -task - -script -. /etc/default/rcS -[ $UTC = yes ] tz=--utc || tz=--localtime -[ $BADYEAR = yes ] badyear=--badyear -exec hwclock --rtc=/dev/rtc0 --systohc $tz --noadjfile $badyear -end script diff -urN 1/rootfs/etc/init/hwclock-save.conf.distrib brainsum1/rootfs/etc/init/hwclock-save.conf.distrib --- 1/rootfs/etc/init/hwclock-save.conf.distrib 1970-01-01 01:00:00.0 +0100 +++ brainsum1/rootfs/etc/init/hwclock-save.conf.distrib 2009-10-23 06:26:12.0 +0200 @@ -0,0 +1,17 @@ +# hwclock-save - save system clock to hardware clock +# +# This task saves the time from the system clock back to the hardware +# clock on shutdown. + +descriptionsave system clock to hardware clock + +start on runlevel [06] + +task + +script +. /etc/default/rcS +
Re: [Lxc-users] kramic on maverick
On 10/26/2010 08:57 AM, Papp Tamás wrote: On 2010.10.24. 22:00, Daniel Lezcano wrote: Can you check you have at least the in the rootfs the /etc/init/console.conf file ? The content should be: # console - getty # # This service maintains a console on tty1 from the point the system is # started until it is shut down again. start on stopped rc RUNLEVEL=[2345] stop on runlevel [!2345] respawn exec /sbin/getty -8 38400 /dev/console The problem was not with the console, but ssh and other services, which supposed to be started by the rc system. After some hours I could get it work. I downloaded an openvz template and made a diff and I made the needed changes to the lxc template. What are these changes ? Yeah, I suppose you logged as non-root and then you did a su - The tty belongs to the initial user and not to the current user, this is why it fails. I suppose when root opens the tty that shouldn't happen, but anyway you can fix this by chmod ugo+rw $(tty) until there is a proper fix for this. Thank you, I'll try it next time. Ok, thanks for pointing the problem. This is something I will fix. -- Daniel -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users
Re: [Lxc-users] kramic on maverick
On 10/24/2010 11:41 AM, Papp Tamás wrote: hi! I'm trying to setup a Ubuntu Karmic container on a Macerick LXC host. It's not working shomehow and I have no clue. The upstart scripts are started, but that's all. 26366 ?Ss 0:00 lxc-start -n brainsum1 -d 26375 ?Ss 0:00 \_ /sbin/init 26486 pts/38 Ss+0:00 \_ /sbin/getty -8 38400 tty4 26490 pts/36 Ss+0:00 \_ /sbin/getty -8 38400 tty2 26491 pts/37 Ss+0:00 \_ /sbin/getty -8 38400 tty3 26497 ?Ss 0:00 \_ cron 26524 pts/35 Ss+0:00 \_ /sbin/getty -8 38400 tty1 I don't know why, there are no boot messages without the option -d. Can you check you have at least the in the rootfs the /etc/init/console.conf file ? The content should be: # console - getty # # This service maintains a console on tty1 from the point the system is # started until it is shut down again. start on stopped rc RUNLEVEL=[2345] stop on runlevel [!2345] respawn exec /sbin/getty -8 38400 /dev/console Also this does not work: $ lxc-start -l DEBUG -o $(tty) -n brainsum1 lxc-start: failed to open log file /dev/pts/39 : Permission denied lxc-start: failed to initialize log service Yeah, I suppose you logged as non-root and then you did a su - The tty belongs to the initial user and not to the current user, this is why it fails. I suppose when root opens the tty that shouldn't happen, but anyway you can fix this by chmod ugo+rw $(tty) until there is a proper fix for this. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ Lxc-users mailing list Lxc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-users