Quantcast

squid-3 problem with "cache_dir null"

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

squid-3 problem with "cache_dir null"

Ralf Hildebrandt
According to the docs,
cache_dir null
takes no further options.

But nevertheless it doesn't work:

# /usr/sbin/squid3 -NsYC -f /etc/squid3/squid.conf.NOCACHE
FATAL: Bungled squid.conf.NOCACHE line 19: cache_dir null /tmp
Squid Cache (Version 3.0.STABLE1): Terminated abnormally.
CPU Usage: 0.008 seconds = 0.004 user + 0.004 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0

# /usr/sbin/squid3 -NsYC -f /etc/squid3/squid.conf.NOCACHE
FATAL: Bungled squid.conf.NOCACHE line 19: cache_dir null
Squid Cache (Version 3.0.STABLE1): Terminated abnormally.
CPU Usage: 0.004 seconds = 0.000 user + 0.004 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0

--
Ralf Hildebrandt (i.A. des IT-Zentrums)         [hidden email]
Charite - Universitätsmedizin Berlin            Tel.  +49 (0)30-450 570-155
Gemeinsame Einrichtung von FU- und HU-Berlin    Fax.  +49 (0)30-450 570-962
IT-Zentrum Standort CBF                    send no mail to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: squid-3 problem with "cache_dir null"

Adrian Chadd
On Tue, Dec 18, 2007, Ralf Hildebrandt wrote:
> According to the docs,
> cache_dir null
> takes no further options.

Where's it say this?




Adrian

--
- Xenion - http://www.xenion.com.au/ - VPS Hosting - Commercial Squid Support -
- $25/pm entry-level VPSes w/ capped bandwidth charges available in WA -
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: squid-3 problem with "cache_dir null"

Amos Jeffries
Administrator
Adrian Chadd wrote:
> On Tue, Dec 18, 2007, Ralf Hildebrandt wrote:
>> According to the docs,
>> cache_dir null
>> takes no further options.
>
> Where's it say this?
>

http://www.squid-cache.org/Versions/v2/2.6/cfgman/cache_dir.html
http://www.squid-cache.org/Versions/v3/3.0/cfgman/cache_dir.html

Both identical.

"
The null store type:

        no options are allowed or required
"

What I suspect here is that it has not been configured in. null-dir is
not a default.

check squid -v and see if it says --enable-storeio= and lists 'null'

Amos
--
Please use Squid 2.6STABLE17 or 3.0STABLE1.
There are serious security advisories out on all earlier releases.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: squid-3 problem with "cache_dir null"

Ralf Hildebrandt
In reply to this post by Adrian Chadd
* Adrian Chadd <[hidden email]>:
> On Tue, Dec 18, 2007, Ralf Hildebrandt wrote:
> > According to the docs,
> > cache_dir null
> > takes no further options.
>
> Where's it say this?

In the default squid.conf:

#       The null store type:
#
#       no options are allowed or required

It doesn't work with the setting from 2.6 either:
cache_dir null /tmp

--
Ralf Hildebrandt (i.A. des IT-Zentrums)         [hidden email]
Charite - Universitätsmedizin Berlin            Tel.  +49 (0)30-450 570-155
Gemeinsame Einrichtung von FU- und HU-Berlin    Fax.  +49 (0)30-450 570-962
IT-Zentrum Standort CBF                    send no mail to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: squid-3 problem with "cache_dir null"

Ralf Hildebrandt
In reply to this post by Amos Jeffries
* Amos Jeffries <[hidden email]>:

> What I suspect here is that it has not been configured in. null-dir is not a
> default.

ARGH. The Debian Maintainer omitted it. AAAARGH

--
Ralf Hildebrandt (i.A. des IT-Zentrums)         [hidden email]
Charite - Universitätsmedizin Berlin            Tel.  +49 (0)30-450 570-155
Gemeinsame Einrichtung von FU- und HU-Berlin    Fax.  +49 (0)30-450 570-962
IT-Zentrum Standort CBF                    send no mail to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: squid-3 problem with "cache_dir null"

Adrian Chadd
In reply to this post by Amos Jeffries
On Tue, Dec 18, 2007, Amos Jeffries wrote:
>
> http://www.squid-cache.org/Versions/v2/2.6/cfgman/cache_dir.html
> http://www.squid-cache.org/Versions/v3/3.0/cfgman/cache_dir.html
>
> Both identical.

Ah, its confusing documentation. That should be fixed.

> "
> The null store type:
>
> no options are allowed or required
> "

Yeah, but what it doesn't make abundantly clear is that the path isn't
an option, its required for all storedir types. :)




adrian

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: squid-3 problem with "cache_dir null"

Amos Jeffries
Administrator
Adrian Chadd wrote:

> On Tue, Dec 18, 2007, Amos Jeffries wrote:
>> http://www.squid-cache.org/Versions/v2/2.6/cfgman/cache_dir.html
>> http://www.squid-cache.org/Versions/v3/3.0/cfgman/cache_dir.html
>>
>> Both identical.
>
> Ah, its confusing documentation. That should be fixed.
>
>> "
>> The null store type:
>>
>> no options are allowed or required
>> "
>
> Yeah, but what it doesn't make abundantly clear is that the path isn't
> an option, its required for all storedir types. :)

It really should not be for null.
null should have an implicit and required "/dev/null" in the source code
if dir string is required for anything like display or hashes.

I assume its still in there for netdb and maybe swap.state?

Amos

--
Please use Squid 2.6STABLE17 or 3.0STABLE1.
There are serious security advisories out on all earlier releases.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: squid-3 problem with "cache_dir null"

Adrian Chadd
On Tue, Dec 18, 2007, Amos Jeffries wrote:

> >Yeah, but what it doesn't make abundantly clear is that the path isn't
> >an option, its required for all storedir types. :)
>
> It really should not be for null.
> null should have an implicit and required "/dev/null" in the source code
> if dir string is required for anything like display or hashes.
>
> I assume its still in there for netdb and maybe swap.state?

Its there for legacy reasons.

Ideally, nothing "special" should be using the first storedir, like netdb.
(And that fails anyway if you use / and run Squid as non-root, so it should
be changed :)

The swap.state isn't used for the null fs, its never opened, closed or checked.
Its a holdover from way long ago, back in "modio" branch days, when I broke
the storage code out into modules. Every storage module back then had a
path, so I put "path" as being something in the SwapDir struct and parsed before
options were handed off to the per-storedir type parser. Another example of
an annoyingly-chosen line in the sand.



Adrian

--
- Xenion - http://www.xenion.com.au/ - VPS Hosting - Commercial Squid Support -
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: squid-3 problem with "cache_dir null"

Amos Jeffries
Administrator
Adrian Chadd wrote:

> On Tue, Dec 18, 2007, Amos Jeffries wrote:
>
>>> Yeah, but what it doesn't make abundantly clear is that the path isn't
>>> an option, its required for all storedir types. :)
>> It really should not be for null.
>> null should have an implicit and required "/dev/null" in the source code
>> if dir string is required for anything like display or hashes.
>>
>> I assume its still in there for netdb and maybe swap.state?
>
> Its there for legacy reasons.
>
> Ideally, nothing "special" should be using the first storedir, like netdb.
> (And that fails anyway if you use / and run Squid as non-root, so it should
> be changed :)
>
> The swap.state isn't used for the null fs, its never opened, closed or checked.
> Its a holdover from way long ago, back in "modio" branch days, when I broke
> the storage code out into modules. Every storage module back then had a
> path, so I put "path" as being something in the SwapDir struct and parsed before
> options were handed off to the per-storedir type parser. Another example of
> an annoyingly-chosen line in the sand.

Which means once the netdb is fixed as per Henriks comments earlier it
can dropped from cache_dir null in next round of squid.conf cleanups.

Thank you.

Amos
--
Please use Squid 2.6STABLE17 or 3.0STABLE1.
There are serious security advisories out on all earlier releases.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: squid-3 problem with "cache_dir null"

Ralf Hildebrandt
In reply to this post by Ralf Hildebrandt
* Ralf Hildebrandt <[hidden email]>:
> * Amos Jeffries <[hidden email]>:
>
> > What I suspect here is that it has not been configured in. null-dir is not a
> > default.
>
> ARGH. The Debian Maintainer omitted it. AAAARGH

I recompiled that package and all is well now.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: squid-3 problem with "cache_dir null"

Henrik Nordström
In reply to this post by Amos Jeffries
On tis, 2007-12-18 at 23:32 +1300, Amos Jeffries wrote:

> It really should not be for null.

The general syntax of cache_dir is

cache_dir <type> <path> <option>

<path> is what identifies the cache_dir line on "squid -k reconfigure".

the null store actually accepts options.. all the global options is
valid for null. But most isn't very useful with "null".

imho what should be done is that the "null" cache_dir type should be
removed, and on-disk cache only configured if there is an cache_dir line
in squid.conf. No builtin default on-disk cache location.

It's not very useful to combine the "null" cache_dir type with other
cache_dir types. It's purpose is simply to override the built-in default
location.

Regards
Henrik

signature.asc (316 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: squid-3 problem with "cache_dir null"

Henrik Nordström
In reply to this post by Amos Jeffries
On tis, 2007-12-18 at 23:57 +1300, Amos Jeffries wrote:

> Which means once the netdb is fixed as per Henriks comments earlier it
> can dropped from cache_dir null in next round of squid.conf cleanups.

the two really is separate issues.

Regards
Henrik

signature.asc (316 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: squid-3 problem with "cache_dir null"

Amos Jeffries
Administrator
Henrik Nordstrom wrote:
> On tis, 2007-12-18 at 23:57 +1300, Amos Jeffries wrote:
>
>> Which means once the netdb is fixed as per Henriks comments earlier it
>> can dropped from cache_dir null in next round of squid.conf cleanups.
>
> the two really is separate issues.
>
> Regards
> Henrik

Seperate but netdb using the dir listed with 'null' is blocking that
dirs non-existence.

Amos
--
Please use Squid 2.6STABLE17 or 3.0STABLE1.
There are serious security advisories out on all earlier releases.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: squid-3 problem with "cache_dir null"

Alex Rousskov
In reply to this post by Henrik Nordström
On Tue, 2007-12-18 at 14:13 +0100, Henrik Nordstrom wrote:

> On tis, 2007-12-18 at 23:32 +1300, Amos Jeffries wrote:
>
> > It really should not be for null.
>
> The general syntax of cache_dir is
>
> cache_dir <type> <path> <option>
>
> <path> is what identifies the cache_dir line on "squid -k reconfigure".
>
> the null store actually accepts options.. all the global options is
> valid for null. But most isn't very useful with "null".
>
> imho what should be done is that the "null" cache_dir type should be
> removed, and on-disk cache only configured if there is an cache_dir line
> in squid.conf. No builtin default on-disk cache location.

Nice approach! Could you please file an enhancement bug report?

Alex.


Loading...