/srv/irclogs.ubuntu.com/2009/03/22/#upstart.txt

MdKeybuk: did you find a solution to the multiple consoles problem? (I mean, standard init only outputs to /dev/console which can be either the monitor *or* the serial console but not both)01:17
KeybukMd: "the multiple consoles problem" ?11:11
MdKeybuk: in practice you cannot use at the same time a serial console and a normal monitor11:19
Mdthis tends to limit the usefulness of configuring a serial console in some environments, so I wonder if this is something which could be solved in upstart...11:20
Keybukwell, you'll still have the basic problem that the kernel only recognises one console at a time11:24
keesjKeybuk: it can and does output to different consoles at the same time, but only one (the first one I think) is interactive12:16
keesjmu upstart "service_console" does some cat /proc/cmdline magic to reuse the same serial as given12:17
Keybukkeesj: how do you mean?12:28
Mdkeesj: the last one, which is the one which connects to /dev/console12:32
Mdso I wonder if it would be practical to make upstart listen for input on all configured consoles12:32
Mds/connects to/becomes/12:32
Keybukupstart doesn't "listen for input" ?12:36
MdKeybuk: think about single user mode, when there is no getty12:37
KeybukMd: yes, but getty can only be attached to one pty at a time13:08
Keybukthere's no pty multiplexer inside the kernel :)13:09
Keybukthere is one in userspace13:09
Keybukcalled "screen" :)13:09
KeybukI've non-jokingly suggested before that on servers we should start screen on the consoles13:09
Keybukbut not sure what happens to consoles at all with KMS yet13:09
MdKeybuk: the problem is not gettys, but everything before that13:24
Mdyou can already start as many gettys as you need13:24
KeybukI'm clearly not following ;)13:29
Mdstdin/out/err of init is normally connected to /dev/console13:30
Mdand /dev/console can be only one of the consoles configured on the kernel command line13:30
Keybukright13:31
Mdso it would be very useful if init could multiplex its input and output on all existing consoles. OTOH, it may be argued that this should be fixed in the kernel13:32
Mdthe use case is that if you configure the serial console e.g. for the IPMI netconsole then an attached monitor and keyboard are useless13:33
Keybukbut it's not that simple13:33
Keybukwhat if the different consoles are different sizes?13:33
Keybukwhat if they have different terminal types (esp. relevant to serial console)13:33
Keybukor different speeds?13:33
Keybukmultiplexing ptys is not a simple job13:34
MdI do not think that there is much expectation of curses applications working before a getty is started anyway13:35
Keybukone of the most run things from single-user mode surely is apt? :p13:35
Keybukwhich implies aptitude13:35
Keybukor debconf13:35
Keybukthey're all curses13:35
Keybukhell13:36
Keybukin Ubuntu we don't just drop to bash in single user mode13:36
Keybukbut we display a curses menu of common fixes13:36
Keybukone of which is "give me a root shell"13:36
Keybukwe often get away with justifying why single user mode exists on the basis that "you're at the physical console, so you could take away the machine"13:37
Keybukopening that up to foreign consoles could be implied to be a bug13:37
KeybukI'm not disagreeing that it would be nice13:38
Keybukbut I think that Upstart is not the appropriate place to do it13:38
Keybukor even in the kernel13:38
Keybukbut reconfiguring single user mode to run screen, connected to the listed consoles, then running things in that13:38
Keybukscreen in single user mode is a win anyway, since then you can spawn additional shells ;)13:38
MdI see that doing this in init is complex, but it's not just single user mode but the messages of the init scripts as well13:39
Keybukoh, I fully plan to get rid of those ;)13:41
Keybukthey shouldn't be on the console anyway unless !quiet13:41
Mdnot even if a script failes?13:42
Mdfails, even13:42
Keybukthe console is not a very useful place to put those13:42
KeybukI'm thinking more of the cron model13:43
Keybuklogging the error messages, e-mailing them, putting them in the syslog, etc.13:43
Keybukit should be trivial to write a program that when you login tells you there were errors during boot13:43
Keybukand you should be able to look through those errors13:43
Keybukand it should encourage people *not* to do things like >/dev/null 2>&1 || true in their jobs13:44
Mdwhat about fsck prompts?13:44
Keybukprompts are better handled in other ways13:44

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!