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

catsupum01:41
catsupfunction nesting is totally different from closures01:41
catsupin fact the difference between them is exactly what is meant by the word 'closure'01:42
ion_He said "gets you mostly there", not "they're equivalent".01:44
rglhi07:58
TimothyPHello, I'm using Ubuntu and I need to start something (an upstart job) AFTER MySQL has started. Someone told me Ubuntu/Upstart only goes to runlevel 2 , can someone verify / explain this? and perhaps tell me how to execute a job AFTER mysql has started?14:31
sadmac2TimothyP: start on started mysql14:35
TimothyPoh that works already?14:36
TimothyPI thought it was to be implemented :d14:36
sadmac2TimothyP: well...upstart does it. how ubuntu has upstart set up (i.e. whether mysql is an upstart job) I don't know.14:36
TimothyPcool, and how does it know mysql is mysql server, does it use the name in /etc/init.d/  or something else (I need to know the details as I need to explain this to others tonight :p)14:37
TimothyPI see14:37
TimothyPok I'll try thnx :d14:37
sadmac2the name of the file in /etc/init.d14:37
* TimothyP is rebooting the vm now to see what happens :d14:38
TimothyPnope didn't do anything doh ! :p14:41
sadmac2hmm. so mysql isn't getting started, isn't called mysql, or isn't started by upstart directly14:41
thomthe latter 14:42
sadmac2well then that's an issue14:43
TimothyPis there a way to list ALL events that are emitted during startup?14:55
sadmac2TimothyP: if you could get `initctl events` running early enough that could do it14:56
TimothyPhmm perhaps adding a job   on runlevel 2 which starts that and logs to a file14:57
TimothyPI'll try14:57
TimothyP if I have on started mysql    for a job  and I /etc/init.d/mysql restart , should that job be executed then?15:17
sadmac2TimothyP: ....that makes no sense15:18
sadmac2/etc/init.d/mysql shouldn't be runnable15:18
sadmac2oh wait15:18
sadmac2I'm thinking of event.d15:18
* sadmac2 facepalm15:18
sadmac2TimothyP: anything in /etc/init.d isn't being managed by upstart15:19
sadmac2so  you can't react to it15:19
TimothyPdamn this is very very confusing all the examples come in the form of on started mysql15:19
TimothyP:p15:19
TimothyPthey should have removed the old system all together and 100% upstart instead of all this mixing :d15:20
sadmac2TimothyP: if mysql is being started by something in init.d then you can't react to it.15:20
sadmac2TimothyP: fedora 9's implementation actually pushes events into upstart from /etc/rc, so it would still work15:20
TimothyPin that case that's a bug in ubuntu , if they want to use upstart and keep the old system they should at least link them :)15:21
TimothyPwhat about emiting something custom myself? I could add that to /etc/init.d/mysql then ? is it possible like initctl emit blabla15:25
sadmac2TimothyP: yes15:26
sadmac2TimothyP: initctl emit started mysql even15:26
TimothyPaha and then I'd on blabla15:26
TimothyPoh15:26
TimothyPand everything ager  emit is a string which should be used then in the on statement?15:26
sadmac2yep15:26
TimothyPbingo15:27
TimothyPthat solves everything15:27
TimothyPthank you15:27
sadmac2np15:27
rglis fedora using upstart by default?16:57
AlexExtremeyes, in fedora 9 it is17:04
=== Keybuk is now known as Keybcz
sadmacKeybcz: why the strange name?22:45
Keybczbecause I'm in Prague22:45
sadmacaah.22:49
sadmacKeybcz: I've been playing with refactoring a couple functions in upstart22:50
sadmacjust for teh lulz22:50
Keybczoh, which ones?22:54
Keybczgot a bzr archive I can pull from?22:56
sadmacKeybcz: event_pending_handle_jobs. Its broke right now though, so it'll be a minute :)23:22
Keybczoh23:24
Keybczwonderful23:24
Keybczthat's the function from hell23:24
KeybczI have about four instances of copy and paste code in the d-bus calls for that23:25
KeybczGetInstance shares some of the code23:25
KeybczStart, Stop and Restart share much of the code23:25
Keybczetc.23:25
KeybczI figured that there should be something that gets an instance from a job class23:26
Keybczand then start and stop functions23:26
Keybczbut they still end up sharing the code that builds the environment to get an instance23:26
Keybczso it's a bit messy really23:26
sadmacwell, I was more doing it for my own understanding, so there might be a better way..23:27
Keybcz*nods*23:27

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