Re: includes inside squid.conf

From: Joe Cooper <joe@dont-contact.us>
Date: Mon, 01 Apr 2002 17:58:41 -0600

Bert Driehuis wrote:
> On Mon, 1 Apr 2002, Alex Rousskov wrote:
>
>
>>One primary reason: once you add optional_include, you will soon
>>discover that what you really need are:
>>optional_include_that_fails_only_if_the_file_is_not_parsable,
>>optional_include_that_fails_only_if_the_file_is_not_there,
>>optional_include_that_fails_only_if_the_disk_is_not_there,
>>optional_include_that_fails_if_it_5pm_and_load_is_high,
>>optional_include_that_fails_if_a_custom_script_fails,
>>optional_include_that_never_fails_but_notifies_root_of_any_problems,
>>etc.
>
> [snip]
>
>>A simpler way is to NOT have optional includes.
>
>
> Actually, I'd use an optional_include that ignored *any* issues
> (including file not existing, being unparseable, etcetera). I'd love to
> get rid of the external redirector I'm using and replacing it with a
> file that holds acl's instead. If the semantics of this optional_include
> would mean that the thing would be parsed until an error is encountered,
> and the rest of the file is treated as not being there, I'd be happy.
>
> Yes, I know my rule set had better not contain an error, but bringing
> down all of my Squids simultaneously because someone added, say, a
> superfluous space somewhere does not thrill me. That's why a very
> limited set of people can touch our Squid configs, and we just can't do
> some things we'd like to do. With optional_includes, I could delegate
> the task of non-critical acl management to the help desk and be done
> with it (cleaning up after them, but not having to deal with a gazillion
> of support calls when Squid goes belly up).
>
> I already have some scars on my soul for redirector stuff I botched due
> to missing a newline. Failure mode counts in some situations.

The solution to this problem already exists:

squid -k parse

Errors will be noted, and can be fixed without interrupting a running
Squid. I don't think I could endorse the sort of optional you're
pushing--way too many worms in that can. I would only want a 'file not
available' optional. My goals could just as easily be accomplished by
making cache_dirs optional (i.e. if a disk isn't present, Squid will run
without it with merely a comment in the logs to that effect).

-- 
Joe Cooper <joe@swelltech.com>
http://www.swelltech.com
Web Caching Appliances and Support
Received on Mon Apr 01 2002 - 17:01:05 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:14:56 MST