/srv/irclogs.ubuntu.com/2008/05/19/#upstart.txt

sadmacKeybuk: just sent an email to our dbus maintainer to get those patches in rawhide00:45
Keybukwho's that?00:47
sadmacDavid Zeuthen00:47
Keybuklol00:58
KeybukI'll nag him tomorrow ;)00:58
sadmacvery nice00:59
sadmacHe's in westford too :)00:59
sadmacI'll have to bring one of those paper fans.01:00
=== Amaranth_ is now known as Amaranth
=== Keybuk_ is now known as Keybuk
=== Keybuk_ is now known as Keybuk
sadmac2Keybuk: good morning15:01
Keybukafternoon15:19
sadmac2well, you're closer to GMT, so we'll use your clock15:20
=== sadmac2_ is now known as sadmac2
sadmac2restarting dbus on a running system = epic fail16:22
Keybukyes16:23
sadmac2Keybuk: that reminds me, if I SIGTERM or otherwise force upstart to re-exec, will it transfer job state to the new instance?16:23
ion_s/(?:restarting | on a running system)//g16:24
sadmac2ion_: ORLY?16:24
ion_YA16:24
sadmac2Keybuk: the test case make targets don't seem to run the dbus code generator as a dependency16:39
suihkulokkisadmac2: dbus should do that.. dammit if it is possible to transfer the irc server connections when upgrading irssi, bloody well something as critical as dbus should do that as well16:41
sadmac2Keybuk: and yes, your patches seem to fix things.16:46
sadmac2your dbus patches that is16:46
sadmac2Keybuk: wb. Just added another patch to my branch18:35
sadmac2rearranged some conditional logic in job_class_reconsider18:35
sadmac2Keybuk: I see the foo ? TRUE : FALSE; construct in a lot of places. Is Upstart code so sensitive to precise values of TRUE that this is necessary?20:55
EvanRhey i just got upstart working on my system, many services are started using the existing sysv scripts... however my scripts print messages during startup like 'samba started.... [OK]', and these get messed up with upstart21:27
sadmac2EvanR: what platform?21:27
EvanRlinux21:27
sadmac2EvanR: what distro rather21:28
EvanRits mostly blfs21:28
EvanRwith upstart it will be a lot less like blfs21:28
EvanRi am about to start moving all the stuff in /etc/rc.d/init.d to event.d scripts21:29
EvanRis there a best practice for printing out status messages like that ?21:30
EvanRor is it all automatic21:30
sadmac2no practice for printing out messages from job defs21:32
sadmac2dunno why the ones in init.d wouldn't work right. something to do with the FD upstart is passing to the job21:32
EvanRdoes upstart do things in sequential order, or is multi-thread-like stuff going to affect the messages ordering21:33
sadmac2upstart is paralell, but when it is emulating sysv (at least, with the standard jobset which does this) it runs the sysv jobs in serial21:34
EvanRi have the example jobs which do rc* compatability21:35
sadmac2yes. those will use your /etc/rc script to run the sysv jobs.21:35
EvanRlets say that i convert all my stuff to event.d ... is there a common / best / popular way to implement the runs levels, or is the recommended strategy something different in the upstart worl21:37
EvanRlike... x-mode text-mode single-user mode events or something21:37
sadmac2upstart does not, by default, use runlevels21:39
EvanRis the concept of runlevels a purely sysv init thing or what21:39
sadmac2the replacement for them is kind of up in the air with 0.3.921:40
sadmac20.5 should see some better mechanisms to deal with different modes.21:40
EvanRdoes it take a specific kernel parameter as input21:40
EvanRhow would i get to single user mode in emergency21:41
sadmac2Kernel parameters can be gotten at any time from anywhere by reading and parsing a certain proc file. you can do it yourself in a shell script with sed21:41
EvanRok so theres no standard21:41
sadmac2you can have a single job starting on startup that parses kernel parameters from /proc and then triggers another event depending on the result21:41
sadmac2that would do it.21:41
EvanRwhat does ubuntu do at the moment21:42
sadmac2I believe ubuntu is still largely in sysv-compatible mode.21:42
sadmac2though theres a couple community projects that make it use more of upstart's functionality21:43
EvanRso back to the issue of bootup status messages, you say its all parallel, whats a good strategy to get those message shown21:43
sadmac2echo from within the scripts has worked for me. I don't know why you would have issues.21:44
EvanRok ill try to get deeper into what is going wrong21:44
EvanRtrying to write a job for samba. script /usr/sbin/smbd; /usr/sbin/nmbd; end script starts, but immediately stops (leaving the daemons running). what am i doing wrong22:42
EvanR/usr/sbin/smbd -D; /usr/sbin/nmbd -F; leaves the job running but sort of hangs the start command, and then stop kills nmbd but not smbd22:43
EvanRperhaps i should have smbd and nmbd in two separate jobs22:47
sadmac2EvanR: you need the "respawn" or "service" stanza in your job definition.22:48
sadmac2and you don't want any of your services to daemonize22:48
sadmac2so --nodaemons all around22:48
EvanRok so i should do22:49
EvanR/usr/sbin/smbd -F &22:49
sadmac2no &22:49
sadmac2if you use respawn, then start won't hang22:49
EvanRi would rather have these two servers controlled by one job22:49
sadmac2No. They should be separate22:49
EvanRhmmmm22:49
EvanRso i have jobs smbd and nmbd, i would like to be able to say # start samba, stop samba22:50
sadmac2# start smbd22:50
sadmac2(nmbd then figures out it needs to be running and runs)22:51
EvanRok22:51
EvanRrespawn doesnt sound right22:51
sadmac2you'll just add a "start on started smbd" line to the start of the nmbd job22:52
sadmac2respawn means if it crashes upstart will bring it back. If you don't want that, then use "service" in stead.22:52
EvanRoh, service and respawn are mututally exclusive?22:53
sadmac2respawn implies service22:53
sadmac2and actually, your job definition script should end in an exec22:54
sadmac2so "exec /usr/sbin/smbd -F"22:54
EvanRi have that22:54
EvanRand for nmbd22:54
sadmac2right22:54
EvanRwell service before that22:54
EvanRand "start on started smbd" "exec /usr/sbin/nmbd -F"22:55
sadmac2right22:55
EvanRthe start on stuff makes things automatic, but what if i want to start jobs conditionally, given what happens in the script of another job22:57
sadmac2like when?22:57
EvanR...........dunno22:57
EvanR:P22:58
EvanRi cant think of a reason22:58
sadmac2If there's no use case, there's probably no way to do it. If a use case appears, we'll probably think of a way to do it :P22:58
EvanRto disable services at bootup, one would comment out the 'start on' stuff...22:58
bochechahi!22:58
sadmac2yes22:58
EvanRheh22:59
bochechajust came to point a typo on the upstart main site: in the "know users" section, it's written "Fedora Rawhide". It should be "Fedora 9 and above" as Fedora 9 was released :)23:00
bochechanot really important, but I saw it while searching for infos about upstart23:01
sadmac2Yes it was :)23:01
* sadmac2 pats himself on the back23:01
bochechaAnyway, upstart seems like a great project. Keep up the good work!23:05
* bochecha goes back to read some doc to understand better how it works23:06
EvanRmy dbus sysvinit stop script is testing the exit status of the killed daemon to determine whether it should remove a file23:24
EvanRis that possible to do from the post-stop script23:24

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