On 27/04/11 23:40, Tsantilas Christos wrote:
This patch implements the "Service Overload Handling" feature as
described in the squid wiki page:
http://wiki.squid-cache.org/Features/ServiceOverload

This feature also exist as bug #2055 in the squid bugzilla:
http://bugs.squid-cache.org/show_bug.cgi?id=2055

More informations included in the patch preamble.

Regards,
Christos

Some relatively minor tweaks in the parse handling:

Adaptation::ServiceConfig::grokLong(
Adaptation::ServiceConfig::grokOnOverload(
Adaptation::ServiceConfig::grokBool(

- Please use DBG_CRITICAL instead of ", 0,". Or if it is not critical bump to an appropriate alternative (parsing errors are usually DBG_IMPORTANT).

- use "ERROR:", "FATAL:","WARNING:" as appropriate to the seriousness of the config problem.

* For parsing problem debugs please just use "cfg_filename" instead of "HERE << cfg_filename".


One *Major* problem:

Adaptation::Icap::ServiceRep::getConnection() is missing IP split-stack support removed from Adaptation::Icap::Xaction::openConnection().

On systems where IPv6 sockets can be opened but the ICAP server is IPv4-only (MacOSX, OpenBSD, Windows, manually disabled kernels) this will fail to connect() the socket.

You will need to preserve the ipv6=on|off option behaviour. Like so:

 Ip::Address anyAddr; // default: IP6_ANY_ADDR
...
 // need a new connection
 if (!reuse) {
  if (!Ip::EnableIpv6)
    anyAddr.SetIPv4();
  else if (Ip::EnableIpv6&IPV6_SPECIAL_SPLITSTACK && !cfg().ipv6)
    /* split-stack for now requires default IPv4-only socket */
    anyAddr.SetIPv4();

connection = comm_open(SOCK_STREAM, 0, anyAddr, COMM_NONBLOCKING, cfg().uri.termedBuf());
  }
...


NP: the failover logics in comm_openex() are for handling sockets with tcp_outgoing_addr pre-known. *_ANY_ADDR will never fail based on family and so will never failover.

Amos
--
Please be using
  Current Stable Squid 2.7.STABLE9 or 3.1.12
  Beta testers wanted for 3.2.0.7 and 3.1.12.1

Reply via email to