[00:43] <gansbrest> hi. I'm trying to restart solr with upstart, but reload command doesn't seem to do anything
[00:43] <gansbrest> have to use stop start to enforce updated config 
[00:44] <gansbrest> I was under impression that it does stop and start behind the scene
[08:33] <xnox> gansbrest: reload simply sends SIGHUP to the daemon process.
[08:33] <xnox> vedic: do you mean server as in the whole machine, or server as in a running daemon?
[15:39] <Tor-Mentor> Hi, 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:41] <Tor-Mentor> The script is basicly an abstract job with a pre-start script stanza in it.
[15:44] <jodh> Tor-Mentor: what happens when you start it manually? is the job running? can we see the .conf?
[15:44] <xnox> Tor-Mentor: usually with "instances" like jobs you pass a variable as well. E.g. start mymultiinstance MYNAME=foo1
[15:45] <Tor-Mentor> Yeah, the script runs fine. It starts all instances. Its just that i need to hit ^ to return to the prompt.
[15:46] <Tor-Mentor> CTRL + C even. Is pastebin ok?
[15:47] <jodh> Tor-Mentor: sure
[15:47] <Tor-Mentor> http://pastebin.com/YNjyNZmB
[15:50] <Tor-Mentor> jodh: I have no problem starting the instances manually via "start pmm MODULE=xmlserver".
[15:51] <jodh> Tor-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] <xnox> Tor-Mentor: why is it a pre-start script, instead of just "script" ... "end script" ?
[15:52] <SpamapS> also
[15:52] <SpamapS> there is no need
[15:52] <SpamapS> just make them all 'start on starting pmm'
[15:52] <SpamapS> Tor-Mentor: ^^
[15:52] <Tor-Mentor> xnox: I wanted to be able to control all instances using "service myapp stop/start"
[15:53] <SpamapS> Tor-Mentor: literally, that job can be one line description "Start/stop all the things"
[15:53] <SpamapS> Tor-Mentor: and they can all just be 'start on starting pmm' and 'stop on stopping pmm'
[15:55] <Tor-Mentor> SpamapS: Im not really following you here. inside pmm I have stop on stopping myapp.
[15:56] <SpamapS> Tor-Mentor: no, you do not need anything in the pmm job
[15:56] <SpamapS> Tor-Mentor: in all the oter jobs, just do 'start on starting pmm' and 'stop on stopping pmm'
[15:57] <SpamapS> pmm can literally be a single line       description "this is just a description"
[15:57] <SpamapS> Tor-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:58] <SpamapS> IMO upstart could improve on this a bit with the 'while' keyword that was discussed oh so long ago
[16:00] <Tor-Mentor> SpamapS: But pmm is the script that controls the jobs and sets up the environment variables needed for the processes. 
[16:00] <SpamapS> ..
[16:01] <Tor-Mentor> I might be misinterpreting you massivly here. 
[16:01] <SpamapS> No you're not
[16:01] <Tor-Mentor> Let me append some to the paste, for clarity.
[16:01] <SpamapS> Tor-Mentor: I used the wrong term
[16:02] <SpamapS> Tor-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 line
[16:02] <Tor-Mentor> Yeah, exactly. 
[16:04] <SpamapS> Tor-Mentor: ok, so I would create a conf file for each of those modules, that is just this:
[16:04] <SpamapS> start on starting pmm-controller
[16:04] <SpamapS> env MODULE=xmlserver
[16:04] <SpamapS> export MODULE
[16:04] <SpamapS> hm
[16:04] <SpamapS> never mind
[16:05] <SpamapS> Tor-Mentor: never mind your way should work fine. Ignore me.. need coffee
[16:05] <Tor-Mentor> Let me show you what I got instead :D
[16:05] <Tor-Mentor> SpamapS: So do I! ^^
[16:10] <Tor-Mentor> http://pastebin.com/BihP0yPS Now with 100% more pmm.conf!
[16:17] <Tor-Mentor> jodh: Is there any resources related to that syntax?
[16:20] <SpamapS> Tor-Mentor: wow
[16:20] <SpamapS> Tor-Mentor: I think you are doing *WAY* too much in upstart
[16:20] <SpamapS> Tor-Mentor: I would have almost all of that in a bash script
[16:21] <SpamapS> Tor-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] <jodh> Tor-Mentor: +1 on SpamapS comment - a .conf file should be very short.
[16:22] <jodh> Tor-Mentor: have upstart 'exec /your/script.sh' and have that script 'exec java $ARGS'.
[16:22] <SpamapS> also 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:24] <SpamapS> jodh: 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 vuds
[16:24] <jodh> SpamapS: dude, if you're paying, I'm there! ;)
[16:24] <Tor-Mentor> Ahhh, sounds good. I will look into it.
[16:26] <Tor-Mentor> I suppose that would require a expect fork, if im running a bash script instead. Is that correct?
[16:31] <Tor-Mentor> Thanks for the help so far.. Im going to go home and play a bit more with this. 
[16:56] <SpamapS> jodh: well I'm paying for my own champagne and toast :)
[16:56] <SpamapS> Tor-Mentor: that is not correct no
[16:56] <SpamapS> Tor-Mentor: expect fork is only needed if your program daemonizes