=== 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 [02:39] hello [02:39] anyone running upstart on a linux-vserver guest? I can't get it to run at all :/ [02:40] what does it do? [02:40] I really dunno, but it seems it doesnt do anything, it just sits there wating for something :| [02:41] I also tried to use the --versbose switch, but it doesn't output anyting at all [02:41] err verbose [02:41] also, it doesn't quit unless I send it the KILL signal [02:42] have you got anything in /etc/event.d ? [02:42] does --debug reveal any insights? [02:43] humm the --debug switch doesn't show up in the init --help [02:43] lemme try it :D === mbiebl [n=michael@e180120041.adsl.alicedsl.de] has joined #upstart [02:44] humm nope, no output. I have to say, that there us no /dev/console in the guest [02:44] s,us,is [02:44] the lack of /dev/console will be why :) [02:44] do you have anything in /etc/event.d in the guest? [02:46] Keybuk, http://paste.linux-vserver.org/607 [02:47] could you add /dev/console to the guest (and /dev/null) [02:47] and try then? [02:48] I'll have to see how to do it heheh gimme a sec :D [02:48] mknod .../dev/console c 5 1 [02:49] its not that simple. [02:50] oh its seems there is no way to have it inside a guest :( [02:51] ?! [02:51] you known linux-vserver.org? [02:51] I maean, do you use it :D [02:52] I don't know it, no [02:52] is that the one that doesn't start init as process #1 ? [02:52] it does [02:53] is there a way to make upstart write in a file instead? [02:53] if you don't mind changing the code ... sure [02:53] main() in init/main.c ... comment out this bit: [02:53] for (i = 0; i < 3; i++) [02:53] close (i); [02:53] process_setup_console (NULL, CONSOLE_OUTPUT); [02:53] if (! restart) [02:53] reset_console (); === phsdv [n=kvirc@88.122.38.252] has joined #upstart [02:54] lemme see if I can build it :D [02:54] (that code's probably bogus anyway, we should let the kernel assign our stdin/out/err [02:54] but there's a bug in the ubuntu initramfs ;p) [02:55] this is not using initramfs at all [02:55] its just running /sbin/init in a different namespace [02:56] yes, 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 given [02:56] sorry, but how do _I build a ubuntu package in place? will debian/rules binary do the trick? [02:56] debian/rules build [02:56] fakeroot debian/rules binary [02:56] or just dpkg-buildpackage -rfakeroot [02:57] You? oh are you the upstream developer? :)) [02:57] of upstart, yes [02:57] cool, nice to meet you :) [02:58] Hi, a short question, can I currently (upstart 0.3.0) define a function within the 'script' 'end script' block? [02:58] <_ion> It's a sh script. [02:59] phsdv: sure, you can only use it within that block though [02:59] ok, thanks, than my problem lies somewhere else. [03:00] phsdv: careful not to use bashisms, /bin/sh may not be bash :) [03:01] my first script (start on startup) terminates with code 1 [03:01] my bin/sh is a links to bash === sladen [i=paul@starsky.19inch.net] has joined #upstart [03:02] s/links/link [03:02] sladen: so rgl is having some problems getting upstart to run inside a vserver [03:02] debugging is made harder by the lack of /dev/console in there ... [03:03] I remember a bug that "kill 1" doesn't work in a vserver guest ... is init assigned PID 1 ? [03:03] rgl: IIRC, vserver calls /etc/init.d/rc directly, unless you specify 'fakeinit' in which case vserver calls /sbin/init instead [03:03] sladen, but it can directlly call init :) [03:03] sladen, and that way I can use all the nice features of upstart :D [03:04] Keybuk: PID 1 (other pids aren't) is virtualised inside a context so that, the init process always /appears/ as pid 1 [03:04] sladen: if it calls getpid() does it get 1? [03:04] Keybuk: should do; but. that might be good to check [03:05] you guys known which packages provides the strings command? [03:05] binutils [03:06] Bertl (current vserver maintainer) appears to be asleep [03:06] Keybuk: does upstart query its own pid? [03:06] Keybuk: and be speffial if it isn't? [03:07] sladen: yes [03:07] if getpid() != 1, then it execs /sbin/telinit instead [03:08] Keybuk, still no luck, no output :( [03:09] oh, I just commented to code you pasted here, but maybe I should open up a file instead === phsdv [n=kvirc@88.122.38.252] has joined #upstart [03:24] rgl: can you try compiling http://www.paul.sladen.org/ubuntu/tmp/getpid.c and saving as /sbin/init ? [03:25] sladen, it is 1 ;) [03:25] sladen, I've already tried that [03:25] rgl: and the parent pid? [03:25] oh that I dunno :| [03:26] I'll run that getpid then :) [03:30] sladen, its this: [03:30] argv[0] : "/sbin/init" [03:30] getpid(): 1 [03:30] getppid(): 8081 [03:30] everytime I run it, the ppid is different [03:31] Keybuk: you don't check the parent pid aswell do you? [03:32] Keybuk: seems that /isn't/ virtualised [03:34] no [03:34] no reason to check that [03:34] I assume that the parent id of everything else shows up as 1? [03:34] and that vserver doesn't break the "init gets SIGCHLD for everything" semantics? === phsdv [n=kvirc@88.122.38.252] has joined #upstart [03:55] Keybuk, sladen: I've added some printfs and it seems to run till nih_main_loop (), now I don't known what happens inside of it [03:58] Keybuk: does sysvinit also reply on getting SIGCHLD for everything? [04:13] can't get it to work, I've change it to write stdout/stderr to a file, but upstart never writes anything to stdout :( [04:22] Keybuk: ^^what crack are you doing with file i/o ? [04:22] rgl: 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 it [04:27] sladen, I can give you access to a vmware instance that I have here, gimme 10 mins or so to set it up [04:27] rgl: yup that would work [04:28] sladen: "with file i/o" ? how do you mean? [04:33] Keybuk: "I've change it to write stdout/stderr to a file, but upstart never writes anything to stdout" [04:33] rgl: stdout is probably buffered btw [04:35] sladen, humm, my printf work fine, because stdout only seems to be line buffered [04:36] sladen, oh, this is taking some time to setup, cause this instance didnt have build-essential installed :( [04:39] rgl: there isn't a hurry, don't worry [04:40] setvbuf(...) should get you a non-buffered stdout [04:40] or you can call flush() lots of times [04:46] sladen: it uses syslog() and openlog(LOG_CONS) for most output [04:46] is it possible that's busted? :) === Amaranth [n=travis@ubuntu/member/amaranth] has joined #upstart [04:57] rgl: just check to see if the syslog output is turning up in the root server... [04:59] sladen, it can't communicate with root server syslog [04:59] sladen, oh well, I'm having trouble getting to the ssh port from inet to this vmware :(( === juergbi [n=juerg@80-219-26-249.dclient.hispeed.ch] has joined #upstart [05:01] rgl: syslog is a syscall, did you check...? [05:02] thought I'm not entirely sure what goes via libc and what via the kernel [05:03] sladen, on the guest there are no new messages [05:03] err on the host [05:03] or root server === sladen grrrghs when the top google results are his own from 2003 [05:06] my 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] for that other issue [05:08] sladen: how much effort do you put into supporting unix datagram sockets, credential parsing, etc.? [05:08] I assume you mangle the credentials to reflect the vserver fake pid 1? [05:09] and does each vserver guest have an independent copy of the unix abstract namespace? [05:09] (as every upstart instance would try to bind to \0/com/ubuntu/upstart [05:16] Keybuk: pretty much all of that stuff was virtualised by a few years back; since namespaces came in they got used to [05:17] ok [05:19] ppid of init not being virtualised to be '1' aswell surprisedme [05:19] but all of these things could do with double checking [05:38] /etc/init.d/rc: line 165: /dev/console: No such file or directory [05:39] so that's actually rc [05:44] I don't think it's unreasonable for anything to assume that /dev/console exists [05:50] sladen, Herbert (aka Bertl) is on #vserver ;) [05:51] Keybuk: it doesn't in this case :-P === phsdv [n=kvirc@88.122.38.252] has left #upstart ["rebooting] [05:52] Keybuk: one reason the Unix kernel succeeded was by simiplfying the internal design, such that syscalls were *allowed* to fail [05:54] Keybuk: userspace should not assume anything. Be Liberal in what you accept and Conversative in what you (the program) assumes. [05:54] Keybuk: you're also trying to make a backwards compatible sysvinit replacement, if it's not, that's a bug [06:00] from your own notes, sysvinit also assumes /dev/console exists [06:00] so upstart is behaving the same as sysvinit in this case :) [06:03] and it's not true that upstart is intended to be a drop-in sysvinit replacement [06:03] for example, it doesn't listen on /dev/initctl [06:03] it'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 apache [06:04] but that is done by replacing those parts with new ones, not by talking to the old ones === AlexExtreme [n=AlexExtr@frugalware/developer/AlexExtreme] has joined #upstart === mbiebl [n=michael@e180120041.adsl.alicedsl.de] has joined #upstart [07:29] sladen, did you manage to find anything wrong with it? [07:29] rgl: sorry, I got waylaid with other stuff [07:30] sladen, ah ok. will'll have some time today to see it? [07:31] rgl: "/etc/vservers/edgy/apps/init/cmd.start" no such file? [07:32] sladen, that appear after executing what command? === concept10 [n=concept1@ppp-70-251-146-197.dsl.rcsntx.swbell.net] has joined #upstart [08:08] does upstart use the same debian type run-levels? === 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"] [10:25] sladen, ping :D === mbiebl [n=michael@e180120041.adsl.alicedsl.de] has joined #upstart