/srv/irclogs.ubuntu.com/2007/11/15/#upstart.txt

mojo__Keybuk: thanks for ur advice yesterday, i finally got my script ported to access directly the keyboard01:49
mojo__Keybuk: and it works01:49
mojo__Keybuk: :)01:50
mojo__Keybuk: i just have 1 question, I created my weird daemon file in /etc/event.d/01:50
mojo__Keybuk: in which I make it start on level 2,3,4,501:51
mojo__Keybuk: when I reboot, the daemon is not started01:53
Keybukhow did you write it?02:04
mojo__Keybuk: u still there?02:39
mojo__plese excuse me, i will flood the irc a bit02:40
mojo__description"weird service daemon"02:40
mojo__author"Trung Le<joneslee85@gmail.com>"02:40
mojo__start on runlevel 202:40
mojo__start on runlevel 302:40
mojo__start on runlevel 402:40
mojo__start on runlevel 502:40
mojo__stop on runlevel 002:40
mojo__stop on runlevel 102:40
mojo__stop on runlevel 302:40
mojo__stop on runlevel 602:40
mojo__console output02:40
mojo__exec /var/www/perlscript/control.pl02:40
mojo__respawn02:40
mojo__Keybuk: this is the code02:40
Keybukshould work02:40
mojo__i know02:41
mojo__but when I restart02:41
mojo__the script doesn't executed02:41
mojo__....02:41
mojo__or should i add in02:41
mojo__start on startup?02:41
Keybukassuming you're using Ubuntu?02:44
mojo__yes02:45
mojo__Keybuk: Ubuntu Gutsy02:45
Keybukhow do you know it's not running?02:46
mojo__well02:46
mojo__initctl list02:46
mojo__i know immediately02:47
Keybukright02:47
Keybukbut it may have run, and then failed and restarted enough times to be stopped02:47
mojo__hmm02:47
mojo__but it works02:47
mojo__if i run start weird02:47
mojo__or stop weird02:47
Keybukthat's why I suspect it is failing for some reason when run at startup02:48
mojo__hmm02:48
mojo__Keybuk: hint on debug?02:48
Keybukreplace exec with02:48
Keybukscript02:48
Keybuk   touch /tmp/foo02:48
Keybuk   exec ...02:48
Keybukend script02:48
Keybukand see whether /tmp/foo apperas02:49
mojo__okay02:49
mojo__i do it now02:49
mojo__Keybuk: rebooting02:50
mojo__Keybuk: the bug might be with the order services starts02:50
Keybukexactly02:50
Keybukyou'll be starting before anything in /etc/rc2.d02:50
mojo__Keybuk: b/c my script need mpdd and lcdd02:51
mojo__Keybuk: those 2 are SysVinit services02:51
Keybukoh02:51
Keybukthat's why it doesn't work then :)02:51
mojo__Keybuk: if those services are not started, then my script won't work02:51
mojo__Keybuk: can u show me how to make sure it loads after those 202:51
Keybukso yeah, your service is being started and then fails02:51
Keybukstart on stopped rc202:51
Keybukstart on stopped rc302:51
Keybuketc.02:51
Keybukinstead of on runlevel 202:51
mojo__okay02:52
mojo__perfecto!!!02:52
mojo__it works!!02:52
mojo__i am so happy!02:52
mojo__thank you so much u know02:53
* Keybuk hmms05:09
KeybukI almost forgot to not "bzr push" there05:09
Keybuk\o/06:03
ArafangionKeybuk: Hey.06:35
Keybukheyhey06:35
ArafangionI took another shot at troubleshooting upstart yesterday, with your quick bash script.06:36
Arafangionexec strace /sbin/init "$@"06:36
ArafangionUnfortunately, that means that /sbin/init is no-longer associated with process id 0, which it explicitly checks before dying.06:36
ArafangionWhich makes sense, I remember seeing that before.06:37
Keybukoh, right06:37
Keybukdamn06:37
KeybukI'd forotten that06:37
ArafangionNext time I feel like it, I _could_ remove that check from the source code myself, and recompile init...06:37
ArafangionI'm thinking I might as well just revert to bsd-style init, though - unless you have some good ideas?06:39
Keybukthe way I'd debug it would be to break in the initramfs before exec'ing init06:40
Keybukand then open up a new vt with bash running06:40
Keybukso I could run initctl events and initctl jobs from it06:40
ArafangionWhat initramfs? ;)06:41
Keybukmake one :p06:42
Keybukinit is hard to debug06:43
Keybukyou have a strange unexpected behaviour06:43
Keybukyou may be able to get away with something like:06:43
Keybuk  start on startup06:43
Keybuk  script06:43
Keybuk    initctl jobs > /tmp/jobs.txt06:43
Keybuk    initctl events > /tmp/events.txt06:44
Keybuk    wait06:44
Keybuk  end script06:44
Keybukbut you'd need a writeable filesystem for that06:44
Keybukoh and "&" on the ends of those lines :p06:44
ArafangionIt's writable very early on.06:44
Keybukearlier than the mount_stage1 you're trying to debug? :p06:44
Keybukactually06:44
ArafangionIt's the _end_ of mount_stage1 that's the problem. :)06:45
Keybukyour mount_stage1 is console output right?06:45
Keybukadd initctl jobs & initctl events & to the top of it06:45
ArafangionThat's a good idea.06:45
ArafangionMaybe upstart needs a more extreme --debug form which collects as much info as possible in a useful form, saving it to /var/log/upstart.dbg?06:46
ArafangionWhich remounts the filesystem in rw by default - this is just a debug, so that should be an acceptable special-case?06:47
Keybukthere's no really portable way to remount the root rw06:48
Keybukmount -o rw,remount / only works for the 95% case06:48
Keybuk(which may be enough)06:48
Arafangion5% of the case where it simply outputs to the screen should satisfy the rest. ;)06:59
Keybukheh06:59
ArafangionAnd besides, those who can't simply remount the root filesystem are probably very aware of that. ;)06:59
Keybukactually, if you can get syslog started early enough, it'll get logged that way06:59
KeybukI often capture --debug by doing init=/bin/bash07:00
Keybukmount -o rw,remount /07:00
Keybuk/etc/init.d/sysklogd start07:00
ArafangionNot many people run from read-only flash drives or cdr's, and not know about it. :)07:00
Keybukexec /sbin/init07:00
ArafangionYou don't get the issue with the proc id check?07:00
Keybukor LVM, RAID, etc. that requires more complex bootstrap07:00
Keybuknot if you exec it07:00
ArafangionAhh, point.07:00
ArafangionThis system is actually running from a USB stick, btw. ;)07:01
ArafangionWell, if it were working, it'd be running on it. :)07:02
ArafangionGoing to watch a movie.07:02
Keybukheh07:04
Keybukhave fun07:04
Keybukbut those should give you some ideas to debug what the hell is goingon07:04
Keybukif it's a kernel bug, I'm going to do a drive-by on some of the developers07:05
KeybukI've had enough of those this month07:05
ArafangionIt's a fairly recent kernel, too. :)07:14
ArafangionAt least, it was very recent not long ago.07:14
Keybukoh07:15
KeybukI can guarantee my kernel is more recent than yours07:15
KeybukI don't think the patch is embargo'd until tomorrow :p07:15
Keybukit turns out that upstart's test suite doubles as a proof-of-concept kernel exploit07:15
ArafangionInteresting.07:21
ArafangionThough, "recent"ness is a flexible concept.07:22
ArafangionAt the time I built the system, the kernel had been out for...  several minutes. ;)07:22
ArafangionAnyway, Stargate time!07:22
=== soren_ is now known as soren
Mogliiihello, is anyone here who  could tell me how to use grub in ubuntu 7.10 to boot into a certain runlevel, lets say 309:54
MogliiiDefault is 2, but appending a 3 in the grub menu item, does not help... Guess its due to upstart09:55
Mogliiihello, is anyone here who  could tell me how to use grub in ubuntu 7.10 to boot into a certain runlevel, lets say 310:02
MogliiiDefault is 2, but appending a 3 in the grub menu item, does not help... Guess its due to upstart10:02
Jc2kMogliii: a bit of googling suggests:10:07
Jc2k  kernel          /boot/vmlinuz-2.6.17-11-386 root=/dev/sda1 ro quiet splash runlevel=310:07
Jc2kis that the syntax you were using?10:08
Mogliiino, I used "/boot/vmlinuz-2.6.17-11-386 root=/dev/sda1 ro quiet splash 3"10:08
Jc2kcan you try it with runlevel=3 then :)10:08
Mogliiiok, I will. Guess I am not the only one with that problem... https://launchpad.net/ubuntu/+source/upstart/+bug/8501410:09
Jc2kahh10:10
Jc2kthe page i found was in spanish but had a similar script10:10
MogliiiSo I will be gone for 5-10 minutes. Have to try it. Will check back again...10:10
Jc2kMogliii: wait a sec10:10
Mogliiiok...10:10
Jc2kyou will need a workaround script..10:11
Jc2kthis is the page that suggested runlevel=3...10:12
Jc2khttp://www.xinug.org/drupal/upstart-runlevel-boot-time10:12
Jc2kbut i can't figure any of the other bits out..10:12
Jc2kyou might be better waiting for one of devs, im just a lurker :)10:12
Mogliiiok, so it does not work with runlevel=3 on ubuntu 7.10. Thats a good thing, so the problem is not with me :)10:14
MogliiiThank you10:14
ion_“The ‘#pragma’ command is specified in the ANSI standard to have an arbitrary implementation-defined effect. In the GNU C preprocessor, ‘#pragma’ first attempts to run the game ‘rogue’; if that fails, it tries to run the game ‘hack’; if that fails, it tries to run GNU Emacs displaying the Tower of Hanoi; if that fails, it reports a fatal error. In any case, preprocessing does not continue.” – Manual for the GNU C preprocessor for GNU CC 1.34.10:24
Jc2klol10:29
Mogliiiany developer online?13:05
KeybukMogliii: hello13:28
Mogliiihi, are you an upstart developer?13:30
Keybukyes13:30
MogliiiI am not sure if you saw the stuff further up, but I am having trouble with passing a runlevel via grub13:30
MogliiiWhat I want to do is to have an entry in grub to start in runlevel 3. I want to execute a backup script and shutdown afterwards.13:31
MogliiiSo to backup I only have to choose an entry and can go to sleep...13:31
Keybukyou were given the answer above13:31
Mogliiiyou mean with that workaround script?13:31
Keybukright13:31
Keybukand you found the bug that says you can't do it13:31
Mogliiiwill there ever be a clean solution for this?13:32
Keybukyes, that's why there's a bug open13:32
Mogliiibut for longer than march... Ok, I will try to understand how to implement the script...13:32
MogliiiThank you for your time!13:35
mojo__Keybuk: it's me again14:14
mojo__Keybuk: does upstart relates to shutdown process?14:14
Keybukit does the shutdown process, yes14:14
mojo__Keybuk: is there anyway to know if the system reach the safe point ("System now halted") so I can press Power button?14:14
mojo__Keybuk: my machine will not have Monitor14:15
Keybukit should say it on the console14:15
mojo__Keybuk: the fact I am designing a media player w/o Console or monitor14:15
mojo__Keybuk: only the LCD screen14:15
Keybukcan it not power itself off?14:15
mojo__Keybuk: small 20x4 dot matrix Matrix Orbital one14:15
mojo__Keybuk: no14:15
Keybukhow come?  that seems to be a bug :)14:16
mojo__Keybuk: the fact LCD daemon killed by then so I can't show the output that system is now safe to turn off14:16
mojo__Keybuk: heh?14:16
mojo__Keybuk: really14:16
Keybukwell, most hardware can power itself off now14:16
mojo__Keybuk: i compile ACPI, APM14:16
mojo__Keybuk: i am using VIA EPA EN12000EG, not power off at all14:16
Keybukdid you try shutdown -h -P ?14:17
mojo__let me try14:18
mojo__said time expected14:18
mojo__okat14:18
mojo__shutdown -h -P now14:18
mojo__works14:18
mojo__waiting for it shutting down14:19
mojo__hmm14:19
mojo__no auto poweroff14:19
mojo__it said System Halted14:19
Keybukok14:21
KeybukI guess you'll need to patch the kernel to notify you in some other useful way14:21
Keybuk(the System Halted message comes from the kernel)14:21
mojo__k14:22
mojo__Keybuk: so... what do i need to debug?14:22
KeybukI have no idea :-)14:23
mojo__Keybuk: then know any can help me out here?14:24
Keybukkernel developers14:24
mojo__any specific channel for that?14:25
Keybukno idea14:25
mojo__Keybuk: fixed14:31
mojo__Keybuk: thx, i append acpi=force to the kernel in menu.lst of grub14:31
JohnFluxYo.15:19
JohnFlux:)15:19
JohnFluxJust want to poke people for  adding a dbus interface to upstart :)15:19
JohnFluxs/for adding/to add/15:20
KeybukI already have one15:21
JohnFluxhmm, it's already been added?15:22
JohnFluxKeybuk: any idea which version of upstart?15:23
Keybuknot in a released version15:24
JohnFluxKeybuk: but it should be in the next released version?15:28
Keybukyes15:28
Keybuk0.5.0 will be d-bus based15:28
JohnFluxKeybuk: what happened to 0.4 ?15:31
Keybukthere is no 0.415:32
=== mbiebl_ is now known as mbiebl

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