/srv/irclogs.ubuntu.com/2013/04/08/#upstart.txt

gansbresthi. I'm trying to restart solr with upstart, but reload command doesn't seem to do anything00:43
gansbresthave to use stop start to enforce updated config 00:43
gansbrestI was under impression that it does stop and start behind the scene00:44
xnoxgansbrest: reload simply sends SIGHUP to the daemon process.08:33
xnoxvedic: do you mean server as in the whole machine, or server as in a running daemon?08:33
=== stgraber_ is now known as stgraber
Tor-MentorHi, im in the process of writing a bootstraping script to start up multiple instances of a process. The script itself works wonders when called at boot, but when called manually with "start my_apps", it does not return to the prompt. 15:39
Tor-MentorThe script is basicly an abstract job with a pre-start script stanza in it.15:41
jodhTor-Mentor: what happens when you start it manually? is the job running? can we see the .conf?15:44
xnoxTor-Mentor: usually with "instances" like jobs you pass a variable as well. E.g. start mymultiinstance MYNAME=foo115:44
Tor-MentorYeah, the script runs fine. It starts all instances. Its just that i need to hit ^ to return to the prompt.15:45
Tor-MentorCTRL + C even. Is pastebin ok?15:46
jodhTor-Mentor: sure15:47
Tor-Mentorhttp://pastebin.com/YNjyNZmB15:47
Tor-Mentorjodh: I have no problem starting the instances manually via "start pmm MODULE=xmlserver".15:50
jodhTor-Mentor: you should probably specify 'start pmm MODULE=$i || true' to avoid the case where a single instance failing to start will stop all subsequent instances starting.15:51
xnoxTor-Mentor: why is it a pre-start script, instead of just "script" ... "end script" ?15:51
SpamapSalso15:52
SpamapSthere is no need15:52
SpamapSjust make them all 'start on starting pmm'15:52
SpamapSTor-Mentor: ^^15:52
Tor-Mentorxnox: I wanted to be able to control all instances using "service myapp stop/start"15:52
SpamapSTor-Mentor: literally, that job can be one line description "Start/stop all the things"15:53
SpamapSTor-Mentor: and they can all just be 'start on starting pmm' and 'stop on stopping pmm'15:53
Tor-MentorSpamapS: Im not really following you here. inside pmm I have stop on stopping myapp.15:55
SpamapSTor-Mentor: no, you do not need anything in the pmm job15:56
SpamapSTor-Mentor: in all the oter jobs, just do 'start on starting pmm' and 'stop on stopping pmm'15:56
SpamapSpmm can literally be a single line       description "this is just a description"15:57
SpamapSTor-Mentor: upstart will keep a "state" for pmm which is either 'start/running' or 'stop/waiting' which you can then use to control all of the other jobs.15:57
SpamapSIMO upstart could improve on this a bit with the 'while' keyword that was discussed oh so long ago15:58
Tor-MentorSpamapS: But pmm is the script that controls the jobs and sets up the environment variables needed for the processes. 16:00
SpamapS..16:00
Tor-MentorI might be misinterpreting you massivly here. 16:01
SpamapSNo you're not16:01
Tor-MentorLet me append some to the paste, for clarity.16:01
SpamapSTor-Mentor: I used the wrong term16:01
SpamapSTor-Mentor: your job that you're showing there is like 'pmm-controller' right? Thats what I meant as the one that can be a single line16:02
Tor-MentorYeah, exactly. 16:02
SpamapSTor-Mentor: ok, so I would create a conf file for each of those modules, that is just this:16:04
SpamapSstart on starting pmm-controller16:04
SpamapSenv MODULE=xmlserver16:04
SpamapSexport MODULE16:04
SpamapShm16:04
SpamapSnever mind16:04
SpamapSTor-Mentor: never mind your way should work fine. Ignore me.. need coffee16:05
Tor-MentorLet me show you what I got instead :D16:05
Tor-MentorSpamapS: So do I! ^^16:05
Tor-Mentorhttp://pastebin.com/BihP0yPS Now with 100% more pmm.conf!16:10
Tor-Mentorjodh: Is there any resources related to that syntax?16:17
SpamapSTor-Mentor: wow16:20
SpamapSTor-Mentor: I think you are doing *WAY* too much in upstart16:20
SpamapSTor-Mentor: I would have almost all of that in a bash script16:20
SpamapSTor-Mentor: and just pass in the module name as the 1st cmdline argument. Then you can separate your concerns (how to launch your program, vs. how to make upstart run your program)16:21
jodhTor-Mentor: +1 on SpamapS comment - a .conf file should be very short.16:21
jodhTor-Mentor: have upstart 'exec /your/script.sh' and have that script 'exec java $ARGS'.16:22
SpamapSalso that way you can do my previous idea much easier, which is to just have a job per module with 'start on starting pmm-controller' and then just 'exec /start/my/program.sh module_name'16:22
SpamapSjodh: btw, since there's no UDS, I think we should have an upstart champagne brunch (breakfast-y hours for west coast US..late lunch for you folk) at vuds16:24
jodhSpamapS: dude, if you're paying, I'm there! ;)16:24
Tor-MentorAhhh, sounds good. I will look into it.16:24
Tor-MentorI suppose that would require a expect fork, if im running a bash script instead. Is that correct?16:26
Tor-MentorThanks for the help so far.. Im going to go home and play a bit more with this. 16:31
SpamapSjodh: well I'm paying for my own champagne and toast :)16:56
SpamapSTor-Mentor: that is not correct no16:56
SpamapSTor-Mentor: expect fork is only needed if your program daemonizes16:56

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