Saleem Ahmed Khan wrote:
Hi Amos,
We have been working on squid-2.6.STABLE18 and as this been already
deployed, changes are required to done on this.
Fair enough. Just checking before things went far down the development
track.
To fulfill this requirement currently i am putting a check in
"parse_cachedir" function of cache_cf.c to see if the cache directories
specified in squid.conf are present or writable by using stat system
call. Based on the true condition I am allocating the swap directories
or returning from the function.
Sounds correct to me.
With this modification I am able to start the squid even with the
unwritable cache directories and caching seems to be happening when i
tested, I would further confirm about this.
As per the requirement I feel this is being addressed, sure if you can
further put some light on this.
Okay. Limiting to startup problems, you are right, has a small scope and
easily addressed.
I was thinking of the feature requests we already had from others about
running-time cache_dirs loss. The startup issue you are fixing was not
mentioned then. http://wiki.squid-cache.org/Features/CacheDirFailover
If you want to present the patch to squid-dev. Even one for 2.6. I'll
see whats needed to port it to 3.x. I expect Henrik may accept it into
2.7 since its a stability issue.
Skipping back to the errors you mentioned earlier. Are they resolved or
still confusing you?
Thank you for the work.
Amos
Regards
Saleem
On Thu, Apr 17, 2008 at 6:33 PM, Amos Jeffries <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
saleem_ak wrote:
I am currently working on requirement if any of the cache
directories are
unavailable or unwritable, squid will not start. We would like
the squid to
only refuse to start if "no" cache_dirs are available - if more
than one is
configured but some are unavailable, we'd like it to log the
error and
continue on with the known-good cache_dir(s).
I am able to do the required changes by having a global counter
to track the
clean cache directories and based on the counter value not equal
to zero i
am allowing squid to start.
You may encounter problems in future with this feature as described.
All releases of squid have an integrated memory-cache. Recent
releases of squid work on the basis that if no cache_dir are present
the memory cache is configured.
You will need to add an option to your feature to cope with that
state. For example; when turned on squid ignores cache_dir loss and
drops right back into memory-cache, but keeps running. When setting
turned off, drops back but ignores memory-cache and dies.
But I am facing these problems
1) the directory cleanup event is trying to cleanup the
unavailable or
unwritable cache directories
2) the objects are tried to cached into the unavailable or
unwritable cache
directories.
As I am new to the squid, I would like to get some proper
direction to
fulfill this requirement.
Is the version of squid important?
This is a major feature, and faces a large hurdle now with squid-2
being closed to large patches.
Adrians was the last developer working on major new features for
Squid-2 and even he has recently decided to abandon direct major
updates to Squid-2 in favor of a different project.
Squid-3 has a very different storage code, and is likely to be the
place where your patch is accepted into squid. The Squid-3 design
can also handle failover cases cleaner.
I am also mentioning the error messages that i am getting with
this change
error messages got after the startup 008/04/15 10:41:31|
storeDirClean: WARNING: Creating
/usr/local/squid.2.6_cachedir/cache/05/69 2008/04/15 10:41:31|
storeDirClean: /usr/local/squid.2.6_cachedir/cache/05/69: (2) No
such file
or directory
this messages are coming during object caching 2008/04/17
06:35:39| storeAufsOpenDone: (2) No such file or directory
2008/04/17 06:35:39|
/usr/local/squid.2.6_cachedir/cache/00/00/0000005E
2008/04/17 06:35:39| storeSwapOutFileClosed: dirno 5, swapfile
0000005E,
errflag=-1
Regards
Saleem
Amos
--
Please use Squid 2.6.STABLE19 or 3.0.STABLE4
--
Thanks and Regards
Saleem Ahmed Khan
+919972522504
--
Please use Squid 2.6.STABLE19 or 3.0.STABLE4