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