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

Reply via email to