Re: Making start/stop idempotent

2009-02-16 Thread Mark Nottingham
http://www.squid-cache.org/bugs/show_bug.cgi?id=2599 On 31/10/2008, at 3:59 AM, Alex Rousskov wrote: On Thu, 2008-10-30 at 00:58 +0100, Henrik Nordstrom wrote: On tor, 2008-10-30 at 10:03 +1100, Mark Nottingham wrote: Hmm, good point. My aim was just start and stop. Seem reasonable to just li

Re: Making start/stop idempotent

2008-10-30 Thread Alex Rousskov
On Thu, 2008-10-30 at 00:58 +0100, Henrik Nordstrom wrote: > On tor, 2008-10-30 at 10:03 +1100, Mark Nottingham wrote: > > Hmm, good point. My aim was just start and stop. Seem reasonable to > > just limit it to those two? > > Yes. And maybe maybe rotate. Perhaps rotate should continue to fail.

Re: Making start/stop idempotent

2008-10-29 Thread Henrik Nordstrom
On tor, 2008-10-30 at 12:35 +1100, Mark Nottingham wrote: > Sounds good. > > To be clear; -k shutdown and rotate will exit(0); the rest (including > kill and interrupt?) will exit(1) as before. shutdown & kill should exit, maybe rotate as well. The rest exit with failure as before. Regards H

Re: Making start/stop idempotent

2008-10-29 Thread Mark Nottingham
Sounds good. To be clear; -k shutdown and rotate will exit(0); the rest (including kill and interrupt?) will exit(1) as before. On 30/10/2008, at 10:58 AM, Henrik Nordstrom wrote: On tor, 2008-10-30 at 10:03 +1100, Mark Nottingham wrote: Hmm, good point. My aim was just start and stop. Se

Re: Making start/stop idempotent

2008-10-29 Thread Henrik Nordstrom
On tor, 2008-10-30 at 10:03 +1100, Mark Nottingham wrote: > Hmm, good point. My aim was just start and stop. Seem reasonable to > just limit it to those two? Yes. And maybe maybe rotate. Regards Henrik signature.asc Description: This is a digitally signed message part

Re: Making start/stop idempotent

2008-10-29 Thread Mark Nottingham
Hmm, good point. My aim was just start and stop. Seem reasonable to just limit it to those two? On 30/10/2008, at 9:52 AM, Henrik Nordstrom wrote: How soft should this be? Do we really want "-k rotate/reconfigure/ debug etc" to consider Squid not running to be a normal situation? Well, rot

Re: Making start/stop idempotent

2008-10-29 Thread Henrik Nordstrom
How soft should this be? Do we really want "-k rotate/reconfigure/debug etc" to consider Squid not running to be a normal situation? Well, rotate maybe, to avoid cron jobs failing. But certainly not reconfigure. On tor, 2008-10-30 at 09:46 +1100, Mark Nottingham wrote: > This tests for opt_send

Re: Making start/stop idempotent

2008-10-29 Thread Mark Nottingham
This tests for opt_send_signal == 0. idempotent_start.patch Description: Binary data On 29/10/2008, at 12:13 PM, Henrik Nordstrom wrote: On ons, 2008-10-29 at 11:32 +1100, Mark Nottingham wrote: I'm not seeing that; no crash, and -k check still correctly finds syntax errors in squid.con

Re: Making start/stop idempotent

2008-10-28 Thread Mark Nottingham
Duh. OK, will fix. On 29/10/2008, at 12:13 PM, Henrik Nordstrom wrote: On ons, 2008-10-29 at 11:32 +1100, Mark Nottingham wrote: I'm not seeing that; no crash, and -k check still correctly finds syntax errors in squid.conf. Behaviour appears the same as without the patch. "squid -k check"

Re: Making start/stop idempotent

2008-10-28 Thread Henrik Nordstrom
On ons, 2008-10-29 at 11:32 +1100, Mark Nottingham wrote: > I'm not seeing that; no crash, and -k check still correctly finds > syntax errors in squid.conf. Behaviour appears the same as without the > patch. "squid -k check" is for checking if Squid is running. "squid -k parse" is the one par

Re: Making start/stop idempotent

2008-10-28 Thread Mark Nottingham
I'm not seeing that; no crash, and -k check still correctly finds syntax errors in squid.conf. Behaviour appears the same as without the patch. On 29/10/2008, at 7:26 AM, Henrik Nordstrom wrote: The first part next to checkRunningPid makes sense. But the second part crashes "squid -k chec

Re: Making start/stop idempotent

2008-10-28 Thread Henrik Nordstrom
The first part next to checkRunningPid makes sense. But the second part crashes "squid -k check", by always returning true if the pid file doesn't exists.. On tis, 2008-10-28 at 20:16 +1100, Mark Nottingham wrote: > I realised I never sent the patch without the option; > > > > > On 12/08/20

Re: Making start/stop idempotent

2008-10-28 Thread Mark Nottingham
I realised I never sent the patch without the option; idempotent_start.patch Description: Binary data On 12/08/2008, at 4:14 PM, Amos Jeffries wrote: So, effectively just change to exit(0) in those two places? For the HEAD commit(s) yes. If you need it ported the option may be neede

Re: Making start/stop idempotent

2008-08-11 Thread Amos Jeffries
> So, effectively just change to exit(0) in those two places? > For the HEAD commit(s) yes. If you need it ported the option may be needed to keep other users going. Amos > > On 12/08/2008, at 4:02 PM, Amos Jeffries wrote: > >>> Our management tools like processes to be idempotent; i.e., you >>>

Re: Making start/stop idempotent

2008-08-11 Thread Mark Nottingham
So, effectively just change to exit(0) in those two places? On 12/08/2008, at 4:02 PM, Amos Jeffries wrote: Our management tools like processes to be idempotent; i.e., you should be able to start or stop a process any number of times without it throwing an error. Currently, Squid will retur

Re: Making start/stop idempotent

2008-08-11 Thread Robert Collins
On Tue, 2008-08-12 at 16:03 +1000, Mark Nottingham wrote: > On 12/08/2008, at 3:50 PM, Robert Collins wrote: > > > On Tue, 2008-08-12 at 15:30 +1000, Mark Nottingham wrote: > >> Well, here's a patch for the behaviour I described... > > > > A patch for 3.x would be nice; > > I'll see what I can do

Re: Making start/stop idempotent

2008-08-11 Thread Mark Nottingham
On 12/08/2008, at 3:50 PM, Robert Collins wrote: On Tue, 2008-08-12 at 15:30 +1000, Mark Nottingham wrote: Well, here's a patch for the behaviour I described... A patch for 3.x would be nice; I'll see what I can do, but undoubtedly I'll be slower than others... your patch seems fine on t

Re: Making start/stop idempotent

2008-08-11 Thread Amos Jeffries
> Our management tools like processes to be idempotent; i.e., you should > be able to start or stop a process any number of times without it > throwing an error. > > Currently, Squid will return 1 if a squid process is already running > (upon start) and when there isn't one (upon -k shutdown). > >

Re: Making start/stop idempotent

2008-08-11 Thread Robert Collins
On Tue, 2008-08-12 at 15:30 +1000, Mark Nottingham wrote: > Well, here's a patch for the behaviour I described... A patch for 3.x would be nice; your patch seems fine on the surface, but adding an option does just seem ugly to me :) -Rob -- GPG key available at:

Re: Making start/stop idempotent

2008-08-11 Thread Mark Nottingham
Well, here's a patch for the behaviour I described... idempotent_start.patch Description: Binary data On 12/08/2008, at 2:49 PM, Robert Collins wrote: On Tue, 2008-08-12 at 14:43 +1000, Mark Nottingham wrote: Our management tools like processes to be idempotent; i.e., you should be a

Re: Making start/stop idempotent

2008-08-11 Thread Robert Collins
On Tue, 2008-08-12 at 14:43 +1000, Mark Nottingham wrote: > Our management tools like processes to be idempotent; i.e., you should > be able to start or stop a process any number of times without it > throwing an error. > > Currently, Squid will return 1 if a squid process is already running

Making start/stop idempotent

2008-08-11 Thread Mark Nottingham
Our management tools like processes to be idempotent; i.e., you should be able to start or stop a process any number of times without it throwing an error. Currently, Squid will return 1 if a squid process is already running (upon start) and when there isn't one (upon -k shutdown). I'm wr