/srv/irclogs.ubuntu.com/2006/11/01/#upstart.txt

=== szivacsi is now known as L4M3RB4R0M
=== L4M3RB4R0M is now known as johnnybuoy
=== johnnybuoy is now known as johnnybuoy|plan9
=== ajmitch [n=ajmitch@ubuntu/member/ajmitch] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart
=== Amaranth_ [n=travis@ubuntu/member/amaranth] has joined #upstart
=== Amaranth_ is now known as Amaranth
=== Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart
=== Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart
=== nibil [n=nibil@adsl-static-3-105.uklinux.net] has joined #upstart
=== hunger [n=tobias@pd95b0676.dip0.t-ipconnect.de] has joined #upstart
=== Md [i=md@freenode/staff/md] has joined #upstart
=== Keybuk [n=scott@quest.netsplit.com] has joined #upstart
=== psypointer [i=fnord@gentoo/contributor/psypointer] has left #upstart []
=== phsdv [n=kvirc@88.122.38.252] has joined #upstart
=== phsdv [n=kvirc@88.122.38.252] has joined #upstart
=== VoodooZ [n=palm3@modemcable214.50-82-70.mc.videotron.ca] has left #upstart []
=== wasabi [n=wasabi@ubuntu/member/wasabi] has joined #upstart
=== rgl [n=Rui@84.90.9.212] has joined #upstart
rglhello02:39
rglanyone running upstart on a linux-vserver guest?  I can't get it to run at all :/02:39
Keybukwhat does it do?02:40
rglI really dunno, but it seems it doesnt do anything, it just sits there wating for something :|02:40
rglI also tried to use the --versbose switch, but it doesn't output anyting at all02:41
rglerr verbose02:41
rglalso, it doesn't quit unless I send it the KILL signal02:41
Keybukhave you got anything in /etc/event.d ?02:42
Keybukdoes --debug reveal any insights?02:42
rglhumm the --debug switch doesn't show up in the init --help02:43
rgllemme try it :D02:43
=== mbiebl [n=michael@e180120041.adsl.alicedsl.de] has joined #upstart
rglhumm nope, no output.  I have to say, that there us no /dev/console in the guest02:44
rgls,us,is02:44
Keybukthe lack of /dev/console will be why :)02:44
Keybukdo you have anything in /etc/event.d in the guest?02:44
rglKeybuk, http://paste.linux-vserver.org/60702:46
Keybukcould you add /dev/console to the guest (and /dev/null)02:47
Keybukand try then?02:47
rglI'll have to see how to do it heheh  gimme a sec :D02:48
Keybukmknod .../dev/console c 5 102:48
rglits not that simple.02:49
rgloh its seems there is no way to have it inside a guest :(02:50
Keybuk?!02:51
rglyou known linux-vserver.org?02:51
rglI maean, do you use it :D02:51
KeybukI don't know it, no02:52
Keybukis that the one that doesn't start init as process #1 ?02:52
rglit does02:52
rglis there a way to make upstart write in a file instead?02:53
Keybukif you don't mind changing the code ... sure02:53
Keybukmain() in init/main.c ... comment out this bit:02:53
Keybuk        for (i = 0; i < 3; i++)02:53
Keybuk                close (i);02:53
Keybuk        process_setup_console (NULL, CONSOLE_OUTPUT);02:53
Keybuk        if (! restart)02:53
Keybuk                reset_console ();02:53
=== phsdv [n=kvirc@88.122.38.252] has joined #upstart
rgllemme see if I can build it :D02:54
Keybuk(that code's probably bogus anyway, we should let the kernel assign our stdin/out/err02:54
Keybukbut there's a bug in the ubuntu initramfs ;p)02:54
rglthis is not using initramfs at all02:55
rglits just running /sbin/init in a different namespace02:55
Keybukyes, I mean the reason that code is there is because our initramfs assumed that init re-opened /dev/console (sysvinit also does) -- I plan to fix *that*, so upstart just uses whatever it's given02:56
rglsorry, but how do _I build a ubuntu package in place?  will debian/rules binary do the trick?02:56
Keybukdebian/rules build02:56
Keybukfakeroot debian/rules binary02:56
Keybukor just dpkg-buildpackage -rfakeroot02:56
rglYou?  oh are you the upstream developer? :))02:57
Keybukof upstart, yes02:57
rglcool, nice to meet you :)02:57
phsdvHi, a short question, can I currently (upstart 0.3.0) define a function within the 'script' 'end script' block?02:58
_ionIt's a sh script.02:58
Keybukphsdv: sure, you can only use it within that block though02:59
phsdvok, thanks, than my problem lies somewhere else.02:59
Keybukphsdv: careful not to use bashisms, /bin/sh may not be bash :)03:00
phsdvmy first script (start on startup) terminates with code 103:01
phsdvmy bin/sh is a links to bash03:01
=== sladen [i=paul@starsky.19inch.net] has joined #upstart
phsdvs/links/link03:02
Keybuksladen: so rgl is having some problems getting upstart to run inside a vserver03:02
Keybukdebugging is made harder by the lack of /dev/console in there ...03:02
KeybukI remember a bug that "kill 1" doesn't work in a vserver guest ... is init assigned PID 1 ?03:03
sladenrgl: IIRC, vserver calls  /etc/init.d/rc  directly, unless you specify 'fakeinit' in which case vserver calls /sbin/init instead03:03
rglsladen, but it can directlly call init :)03:03
rglsladen, and that way I can use all the nice features of upstart :D03:03
sladenKeybuk: PID 1 (other pids aren't) is virtualised inside a context so that, the init process always /appears/ as pid 103:04
Keybuksladen: if it calls getpid() does it get 1?03:04
sladenKeybuk: should do; but.  that might be good to check03:04
rglyou guys known which packages provides the strings command?03:05
Keybukbinutils03:05
sladenBertl (current vserver maintainer) appears to be asleep03:06
sladenKeybuk: does upstart query its own pid?03:06
sladenKeybuk: and be speffial if it isn't?03:06
Keybuksladen: yes03:07
Keybukif getpid() != 1, then it execs /sbin/telinit instead03:07
rglKeybuk, still no luck, no output :(03:08
rgloh, I just commented to code you pasted here, but maybe I should open up a file instead03:09
=== phsdv [n=kvirc@88.122.38.252] has joined #upstart
sladenrgl: can you try compiling http://www.paul.sladen.org/ubuntu/tmp/getpid.c and saving as /sbin/init ?03:24
rglsladen, it is 1 ;)03:25
rglsladen, I've already tried that03:25
sladenrgl: and the parent pid?03:25
rgloh that I dunno :|03:25
rglI'll run that getpid then :)03:26
rglsladen, its this:03:30
rglargv[0] : "/sbin/init"03:30
rglgetpid(): 103:30
rglgetppid(): 808103:30
rgleverytime I run it, the ppid is different03:30
sladenKeybuk: you don't check the parent pid aswell do you?03:31
sladenKeybuk: seems that /isn't/ virtualised03:32
Keybukno03:34
Keybukno reason to check that03:34
KeybukI assume that the parent id of everything else shows up as 1?03:34
Keybukand that vserver doesn't break the "init gets SIGCHLD for everything" semantics?03:34
=== phsdv [n=kvirc@88.122.38.252] has joined #upstart
rglKeybuk, sladen: I've added some printfs and it seems to run till nih_main_loop (), now I don't known what happens inside of it03:55
sladenKeybuk: does sysvinit also reply on getting SIGCHLD for everything?03:58
rglcan't get it to work, I've change it to write stdout/stderr to a file, but upstart never writes anything to stdout :(04:13
sladenKeybuk: ^^what crack are you doing with file i/o ?04:22
sladenrgl: I don't have a recent vserver box setup, if can you give me SSH access to a machine I can have a quick look at it04:22
rglsladen, I can give you access to a vmware instance that I have here, gimme 10 mins or so to set it up04:27
sladenrgl: yup that would work04:27
Keybuksladen: "with file i/o" ?  how do you mean?04:28
sladenKeybuk: "I've change it to write stdout/stderr to a file, but upstart never writes anything to stdout"04:33
sladenrgl: stdout is probably buffered btw04:33
rglsladen, humm, my printf work fine, because stdout only seems to be line buffered04:35
rglsladen, oh, this is taking some time to setup, cause this instance didnt have build-essential installed :(04:36
sladenrgl: there isn't a hurry, don't worry04:39
sladensetvbuf(...) should get you a non-buffered stdout04:40
sladenor you can call flush() lots of times04:40
Keybuksladen: it uses syslog() and openlog(LOG_CONS) for most output04:46
Keybukis it possible that's busted? :)04:46
=== Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart
sladenrgl: just check to see if the syslog output is turning up in the root server...04:57
rglsladen, it can't communicate with root server syslog04:59
rglsladen, oh well, I'm having trouble getting to the ssh port from inet to this vmware :((04:59
=== juergbi [n=juerg@80-219-26-249.dclient.hispeed.ch] has joined #upstart
sladenrgl: syslog is a syscall, did you check...?05:01
sladenthought I'm not entirely sure what goes via libc and what via the kernel05:02
rglsladen, on the guest there are no new messages05:03
rglerr on the host05:03
rglor root server05:03
=== sladen grrrghs when the top google results are his own from 2003
sladenmy http://www.paul.sladen.org/vserver/fix0r.txt list says "fix: We need to write a fake `console' driver that can pipe to a file.05:06
sladenfor that other issue05:06
Keybuksladen: how much effort do you put into supporting unix datagram sockets, credential parsing, etc.?05:08
KeybukI assume you mangle the credentials to reflect the vserver fake pid 1?05:08
Keybukand does each vserver guest have an independent copy of the unix abstract namespace?05:09
Keybuk(as every upstart instance would try to bind to \0/com/ubuntu/upstart05:09
sladenKeybuk: pretty much all of that stuff was virtualised by a few years back;  since namespaces came in they got used to05:16
Keybukok05:17
sladenppid of init not being virtualised to be '1' aswell surprisedme05:19
sladenbut all of these things could do with double checking05:19
sladen /etc/init.d/rc: line 165: /dev/console: No such file or directory05:38
sladenso that's actually rc05:39
KeybukI don't think it's unreasonable for anything to assume that /dev/console exists05:44
rglsladen, Herbert (aka Bertl) is on #vserver ;)05:50
sladenKeybuk: it doesn't in this case :-P05:51
=== phsdv [n=kvirc@88.122.38.252] has left #upstart ["rebooting]
sladenKeybuk: one reason the Unix kernel succeeded was by simiplfying the internal design, such that syscalls were *allowed* to fail05:52
sladenKeybuk: userspace should not assume anything.  Be Liberal in what you accept and Conversative in what you (the program) assumes.05:54
sladenKeybuk: you're also trying to make a backwards compatible sysvinit replacement, if it's not, that's a bug05:54
Keybukfrom your own notes, sysvinit also assumes /dev/console exists06:00
Keybukso upstart is behaving the same as sysvinit in this case :)06:00
Keybukand it's not true that upstart is intended to be a drop-in sysvinit replacement06:03
Keybukfor example, it doesn't listen on /dev/initctl06:03
Keybukit's intended to be compatible from a user tools and application stand-point, so that you don't need to re-teach your fingers, or fix apache06:03
Keybukbut that is done by replacing those parts with new ones, not by talking to the old ones06:04
=== AlexExtreme [n=AlexExtr@frugalware/developer/AlexExtreme] has joined #upstart
=== mbiebl [n=michael@e180120041.adsl.alicedsl.de] has joined #upstart
rglsladen, did you manage to find anything wrong with it?07:29
sladenrgl: sorry, I got waylaid with other stuff07:29
rglsladen, ah ok.  will'll have some time today to see it?07:30
sladenrgl: "/etc/vservers/edgy/apps/init/cmd.start" no such file?07:31
rglsladen, that appear after executing what command?07:32
=== concept10 [n=concept1@ppp-70-251-146-197.dsl.rcsntx.swbell.net] has joined #upstart
concept10does upstart use the same debian type run-levels?08:08
=== Amaranth_ [n=travis@ubuntu/member/amaranth] has joined #upstart
=== Amaranth_ is now known as Amaranth
=== Seveas [n=seveas@ubuntu/member/seveas] has joined #upstart
=== concept10 [n=concept1@ppp-70-251-146-197.dsl.rcsntx.swbell.net] has left #upstart ["Ex-Chat"]
rglsladen, ping :D10:25
=== mbiebl [n=michael@e180120041.adsl.alicedsl.de] has joined #upstart

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