[squid-users] Re: Solved - [squid-users] wccp2 does not working

From: Sokvantha YOUK <sokvantha_at_gmail.com>
Date: Tue, 19 Mar 2013 22:14:07 +0700

Dear All,

My issue with WCCP is solved with following configuration:

--- Using process macro to isolate cache_dir to each process
--- I have allowed each process to have two cache_dir
--- Then reconfigure squid with /usr/local/squid/sbin/squid -k reconf
--- Look at the router using
#show ip wccp 80 detail

Here is my configuration

# Rockstore filesytem
workers 4
cpu_affinity_map process_numbers=1,2,3,4 cores=2,4,6,8

if ${process_number}=1
cache_dir rock /cache1 170000 max-size=31000
cache_dir rock /cache2 170000 max-size=31000
endif

if ${process_number}=2
cache_dir rock /cache3 170000 max-size=31000
cache_dir rock /cache4 170000 max-size=31000
endif

if ${process_number}=3
cache_dir rock /cache5 170000 max-size=31000
cache_dir rock /cache6 170000 max-size=31000
endif

# AUFS file system
if ${process_number}=4
cache_dir aufs /cache7/squid/${process_number} 170000 16 256
min-size=31001 max-size=200000000
cache_dir aufs /cache8/squid/${process_number} 170000 16 256
min-size=31001 max-size=200000000
endif

----
Regards,
Vantha
Dear Amos,
On Tue, Mar 19, 2013 at 6:23 PM, Sokvantha YOUK <sokvantha_at_gmail.com> wrote:
> Dear Amos,
>
> After removing "Workers" SMP, WCCP works fine :) I want to make use of
> SMP feature with Rock store. What is alternate solution for this?
>
> ---
> Regards,
> Vantha
>
> On Tue, Mar 19, 2013 at 5:36 PM, Amos Jeffries <squid3_at_treenet.co.nz> wrote:
>> On 19/03/2013 11:27 p.m., Sokvantha YOUK wrote:
>>>
>>> Dear Amos,
>>>
>>> I have run tcpdump on the wccp interface for 10 minutes but see nothing
>>> happens.
>>>
>>> My previous email:
>>>
>>> -- Before meaning that, I run squid 3.3.3 with no rock store files
>>> system support at compiled time and wccp just works fine.
>>>
>>> What else I need to check?
>>
>>
>> Okay.
>>
>> Rock storage type and SMP workers are two very different (although related)
>> features.
>> So the next thing to try is to see if a similar config with rock but not
>> "workers" SMP is working or not?
>>
>> Amos
>>
>>
>>> ----
>>> Regards,
>>> Vantha
>>>
>>> On Tue, Mar 19, 2013 at 4:16 PM, Amos Jeffries <squid3_at_treenet.co.nz>
>>> wrote:
>>>>
>>>> On 19/03/2013 9:27 p.m., Sokvantha YOUK wrote:
>>>>>
>>>>> Dear All,
>>>>>
>>>>> I am appreciate your expert advices on this matter :). I have tried
>>>>> with following configuration but it is strange that WCCP2 is not
>>>>> initiated the communication with Cisco Router. I were using this
>>>>> configuration before, wccp2 was working fine.
>>>>
>>>>
>>>> What do you mean by "before" ?
>>>>   ... same Squid, same config working yesterday?
>>>>   ... SMP support enabled in older Squid before we coded it?
>>>>   ... or earlier releases without SMP support were working with WCCP?
>>>>
>>>>
>>>>
>>>>> Operation System: CentOS 6.4, x64 bits, Kernel 2.6.32-358.2.1.el6.x86_64
>>>>>
>>>>> Below is my configuration:
>>>>>
>>>>> 1. Disk mount option
>>>>> /dev/sdb1 /cache1 ext4
>>>>> defaults,noatime,nodiratime,noacl,barrier=0,data=writeback,commit=100
>>>>>         0 0
>>>>> /dev/sdc1 /cache2 ext4
>>>>> defaults,noatime,nodiratime,noacl,barrier=0,data=writeback,commit=100
>>>>>         0 0
>>>>> /dev/sdd1 /cache3 ext4
>>>>> defaults,noatime,nodiratime,noacl,barrier=0,data=writeback,commit=100
>>>>>         0 0
>>>>> /dev/sde1 /cache4 ext4
>>>>> defaults,noatime,nodiratime,noacl,barrier=0,data=writeback,commit=100
>>>>>         0 0
>>>>> /dev/sdf1 /cache5 ext4
>>>>> defaults,noatime,nodiratime,noacl,barrier=0,data=writeback,commit=100
>>>>>         0 0
>>>>> /dev/sdg1 /cache6 ext4
>>>>> defaults,noatime,nodiratime,noacl,barrier=0,data=writeback,commit=100
>>>>>         0 0
>>>>> /dev/sdh1 /cache7 ext4
>>>>> defaults,noatime,nodiratime,noacl,barrier=0,data=writeback,commit=100
>>>>>         0 0
>>>>> /dev/sdi1 /cache8 ext4
>>>>> defaults,noatime,nodiratime,noacl,barrier=0,data=writeback,commit=100
>>>>>         0 0
>>>>>
>>>>> 2. Squid compiled option
>>>>> Squid Cache: Version 3.3.3-20130318-r12517
>>>>> configure options:  '--sysconfdir=/etc/squid'
>>>>> '--enable-follow-x-forwarded-for' '--enable-snmp'
>>>>> '--enable-linux-netfilter' '--enable-http-violations'
>>>>> '--enable-delay-pools' '--enable-storeio=diskd,aufs,ufs,rock'
>>>>> '--with-large-files' '--enable-removal-policies=lru,heap'
>>>>> '--enable-ltdl-convenience' '--with-logdir=/var/log/squid'
>>>>> '--enable-wccpv2' '--with-default-user=squid'
>>>>> '--enable-log-daemon-helpers' '--enable-build-info'
>>>>> '--enable-url-rewrite-helpers' '--enable-async-io=128'
>>>>>
>>>>> 3. Squid Configuration
>>>>> #######################################################
>>>>> # wccpv2 configuration
>>>>> #######################################################
>>>>> wccp2_router <wccp router ip>
>>>>> wccp2_forwarding_method 2
>>>>> wccp2_return_method 2
>>>>> wccp_version 4
>>>>> wccp2_assignment_method 2
>>>>
>>>>
>>>> FYI: Since 3.2 the above magic numbers can all be written as textual
>>>> labels
>>>> for easier reading.
>>>>
>>>>
>>>>> wccp2_service dynamic 80 password=abc
>>>>> wccp2_service_info 80 protocol=tcp flags=src_ip_hash priority=240
>>>>> ports=80
>>>>> wccp2_service dynamic 90 password=abc
>>>>> wccp2_service_info 90 protocol=tcp flags=dst_ip_hash,ports_source
>>>>> priority=240 ports=80
>>>>>
>>>>> # Rockstore filesytem
>>>>> workers 4
>>>>> cpu_affinity_map process_numbers=1,2,3,4 cores=1,3,5,7
>>>>>
>>>>> cache_dir  rock /cache1         170000 max-size=31000
>>>>> cache_dir  rock /cache2         170000 max-size=31000
>>>>> cache_dir  rock /cache3         170000 max-size=31000
>>>>> cache_dir  rock /cache4         170000 max-size=31000
>>>>> cache_dir  rock /cache5         170000 max-size=31000
>>>>> cache_dir  rock /cache6         170000 max-size=31000
>>>>>
>>>>> # AUFS file system
>>>>> if ${process_number}=4
>>>>> cache_dir  aufs /cache7/squid/${process_number}         170000 16 256
>>>>> min-size=31001 max-size=200000000
>>>>> cache_dir  aufs /cache8/squid/${process_number}         170000 16 256
>>>>> min-size=31001 max-size=200000000
>>>>> endif
>>>>>
>>>>> I don't understand which directive impacted on WCCP2 protocol which
>>>>> prevented it from establishing communication with the router.
>>>>> So as result http traffic is not redirected to this squid server :(
>>>>
>>>>
>>>> If there is any way you can tcpdump the WCCP packets please do. The
>>>> latest
>>>> versions of Wireshark are able to decipher the WCCP packets peoperly now.
>>>>
>>>>
>>>>> May you help suggest me what else to check for the bug?
>>>>
>>>>
>>>> I am suspecting it is SMP suport issue. WCCP code is not SMP aware. It
>>>> should theoretically be SMP agnostic in that all workers are pinging the
>>>> router and advertising the same details, so in theory the router just
>>>> gets
>>>> 4x the normal HERE_I_AM packet pings.
>>>>
>>>> Amos
>>>
>>>
>>>
>>
>
>
>
> --
> ----
> Regards,
> Vantha
--
----
Regards,
Vantha
Received on Tue Mar 19 2013 - 15:14:14 MDT

This archive was generated by hypermail 2.2.0 : Wed Mar 20 2013 - 12:00:06 MDT