[15:08] spamaps: ok well that is good news and bad news, since 12.04 would still support mongrel.. thus the upstart script should spawn multiple puppetmasters [17:02] glenn___: can you point me to the code that spawns multiple mongrel based puppet masters right now? [17:02] glenn___: I suspect you'll want to use the 'instance' keyword [17:58] spamaps: http://paste.ubuntu.com/890983/ and http://paste.ubuntu.com/890984/ [17:58] spamaps: its what i have so far... and it spawnz multiple masters.. it just wont shut them down yet :) [18:01] spamaps: I must be doing something wrong.. but im glad its spawning multiple masters though.. just finished that work [18:01] start on puppetmaster [18:01] stop on puppetmaster [18:01] glenn___: neither of those will do anything useful :) [18:02] spamaps: when i start puppetmaster, it will start puppetmasters too :) [18:02] glenn___: you probably want 'stop on stopping puppetmaster' [18:02] spamaps: just tried that, and gave weird fails, ill try it again :> [18:02] glenn___: yes, but there is no defined event 'puppetmaster' so that start on isn't useful [18:03] spamaps: when im using stop op stopping puppetmaster it wont start anymore [18:03] glenn___: why not do the check for mongrel in puppetmaster, so you avoid ever starting 'puppetmaster' ? [18:04] err [18:04] puppetmasters [18:04] those names are very confusing [18:04] would rather see a 'puppetmaster-mongrel' [18:04] oh the logfile is starting it, the processes are just not spawned [18:05] glenn___: all in all though, you're on the right track [18:05] spamaps: thanks :) but in puppetmasters (mongrel) im doing a check for servertype = mongrel [18:05] spamaps: so if its not mongrel it wont use puppetmasters [18:05] glenn___: right, seems silly to go through the trouble of starting another job.. when you could do that check in 'puppetmaster' [18:06] and void the entire loop [18:06] avoid rather [18:06] oh wait [18:06] you do [18:06] so nevermind :) [18:06] hehe [18:11] but why would it not start if i say stop on stopping puppetmaster [18:13] glenn___: it should stop at that point, yes. [18:14] glenn___: which means it wil be sent SIGTERM, then if it hasn't died in 5 seconds, it will be sent 'SIGKILL' (you can change that with 'kill timeout #') [18:39] im confused [18:39] when i add that line, nothing is starting anymore :( [18:40] and when i remove it, everything starts, but wont stop [18:41] lol [18:45] root@puppetclient:/etc/init# stop puppetmaster [18:45] stop: Unknown instance: [18:45] carnit [18:59] i think i know why its stopping [18:59] its only starting the puppetmastermongrels, it leaves puppetmaster stopped :) [19:01] how am i supposed to keep puppetmaster running when it only spawns puppetmastermongrels? [19:02] ls [19:03] im on it :> [19:03] almost [19:03] the pain :) [19:06] glenn___: its stopped because your script exitted [19:07] glenn___: so instead of 'stop on stopping puppetmaster' I'd recommend 'stop on runlevel [^2345]' [19:08] spamaps: i fixed that, im using ur tip now.. [19:37] argh [19:38] spamaps: how can i have puppetmaster running, when it is starting other upstart jobs? [19:38] spamaps: isnt there a trick so puppetmaster will show the other upstart jobs, and think its running? [19:58] oh [19:58] i think i got something now :> [20:00] but this will only start 1 extra daemon [20:01] at least it stops too :> [20:01] ps auxf [20:09] IT WORX :> [20:10] i just need 3 upstart files :) [20:12] Spamaps: http://paste.ubuntu.com/891213/ http://paste.ubuntu.com/891214/ http://paste.ubuntu.com/891217/ [20:13] awesome :) [20:22] im someone could review this and give me feedback that would be good [20:58] glenn___: there seems to be a lot of "extra" stuff there... I think it could be done simpler. :-P [21:51] how do i control an upstart job without sudo [21:51] EX: start foojob, stop foojob [21:51] i added the setuid and setgid but no go [21:58] jaha: er, you don't? ;) those are root's commands. [21:59] jaha: unless you're talking about user jobs. [21:59] in ~/.init [21:59] these are jobs i created [21:59] conf files in /etc/init [21:59] oh then those are system jobs [21:59] and you must be root to manipulate them [22:00] ok, well im trying to start/stop jobs through a chid process im spawning with node.js [22:01] i get sudo errors when trying to sudo a command in the process, any idea how I might get around that? [22:02] jaha: make sure you have NOPASSWD privileges for the start/stop commands [22:03] so like this [22:03] mydaemonuser ALL = NOPASSWD: start [22:06] i also just found that "service job reload" may work, would that be safer? [22:06] instead of sudo reload job [22:10] jaha: no, its identical [22:10] though I do advocate using the 'service' command because its more portable [22:10] and restart "does the right thing" when the service is stopped [22:10] (meaning it ignores that it is stopped, and starts it) [22:11] thanks, i appreciate the help [22:14] so basically: use sudo, but without password restrictions [22:14] and you might want to restrict what services can be manipulated without password... [22:16] (I don't think it's a good idea 'mydaemonuser' can start/stop random jobs) [22:28] JanC: agreed