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