Re: [wccpd-devel] kernel wccp support
Status: Alpha
Brought to you by:
ejbs
|
From: Eduardo J. B. <ej...@ne...> - 2002-01-30 12:48:38
|
On Tue, 2002-01-29 at 20:27, Blues wrote:
On 29 Jan 2002, Eduardo J. Blanco wrote:
> Few reflections:
> - location of scripts - I don't know where should it be, maybe in
> /etc/wccp/scripts ?
> Sigh... I don't specially like scripts under /etc (yeah, I know,
> /etc/rc.d). What does the FSSTD has to say about it? IIRC, GNU tends
> to use /usr/libexec for that.
I'll look at that in some free time.
This is strange thing...
1. This can be changed to make something work otherwise (esp. other marks)
-> /etc/......
2. like other scripts it can be run-by-hand by root -> /usr/sbin
3. Maybe standards(TM) are talking something about this kind of files?
4. I really shure it shouldn't be in /usr/lib/wccpd - this is not any
library.
...so... maybe move it to /var/lib/wccpd ? AFAIR FHS says that there
should be any of program datas.
From _user_ point the best thing would be /usr/sbin ....
Am I making to much flame ? ;)
Don't worry about the flame.
IMHO, the user shouldn't need to call these scripts directly (because
wccpd will get confused), and they are not program data either. That's
why I put it libexec (from ./configure --help):
--libexecdir=DIR program executables in DIR [EPREFIX/libexec]
The way I see it, these scripts are auxiliary executables needed -only-
by wccpd.
> - dc called in scripts - ugly :)
> Agreed. Any way to convert a decimal number to hex or viceversa? ip
> rule, iptables and the like all differ slightly on what they expect. :-(
> - all caches should be called from some configuration file (maybe in
> /etc/wccp/wccpd.conf.
> Sorry, I don't understand this... Do you want a config file to list the
> valid caches?
This 2 thing are connected (in my mind ;)
I think that wccpd should call all of the externel programs (ip, ipvs).
Only iptables/ipchains should stay for the end-user.
Now - if it will be done (should, I think...):
1. one config-file will drive everything. eg. config:
cache {
server proxy1.bla.bla.pl;
wccp-protocol 1;
encapsulation gre;
fw-mark 0x80;
}
2. scripts location will be no problem anymore (no scripts :) )
3. system log will be more reliable - now only connection of new cache is
noticed. Disconnection isn't. Some diagnostics can be made...? :)
Sigh... I really don't like this option. I always wanted to make wccpd
as portable as possible, that's why I split the OS related stuff from
the WCCP protocol itself. You could write similar scripts for BSD, or
whatever. Making wccpd call the programs directly only imposes a
limitation, IMHO.
OTOH, some of the scripts for WCCP v2 will need to call
ipchains/iptables to cope with dynamic service groups. (ie. services
described by the webcache dynamically)
I'm planning to add a config file for WCCPv2, as I have pretty much no
other option. I'll take the chance to do something like you suggested.
Sure - almost everything can be done by smarter script, but... its not
"clean" solution. Point 3 can't be done in current model.
Disadvantages of making it that way:
- it will be external-programs-dependent
- no easy way to change proxies on-fly. Solution of that can be some
socket or something like that + some small external program for
management.
Is it clear?
About point #3, there are 3 conditions for a cache to 'leave':
1) Timeout - presumably the cache is down or rebooted, and it stopped
sending correct I_AM_HERE messages.
2) The designated cache took it out of the assignment hash.
3) wccpd is about to exit.
In all three cases, you should see something like:
WebCache at xxx.xxx.xxx.xxx disabled
Let me know if you don't.
I could change those messages to something like:
WebCache at xxx.xxx.xxx.xxx expired
WebCache at xxx.xxx.xxx.xxx disabled by designated WebCache
WebCache at xxx.xxx.xxx.xxx disabled by wccpd shutdown
About the second problem you describe, I plan to use a default entry for
non-declared caches. WCCP v2 would, of course, fix most of this issues.
--ejbs
|