Hi, Eliezer,
I didn't remove the debug section. The debug message keeps unchanged
if the swap directories are configured. But if nothing is configured
but the user run "squid -z", it will notify users to configure the
directory instead of saying "creating swap directory" without doing
anything.
T
On Mon, Dec 24, 2012 at 1:05 PM, Eliezer Croitoru <eliezer_at_ngtech.co.il> wrote:
> Hey Tianyin,
>
> These patches are better to be sent the squid-dev.
> I would choose to not remove this specific debug section and to change it to
> something else and in the loop notify the name of cache dir.
>
> Eliezer
>
>
> On 12/24/2012 10:36 PM, Tianyin Xu wrote:
>>
>> sounds good, Eliezer!
>>
>> I did one:
>>
>> --- /home/tianyin/source/squid-3.2.5/src/main.cc 2012-12-10
>> 01:53:26.000000000 -0800
>> +++ ./src/main.cc 2012-12-24 00:13:38.591134863 -0800
>> @@ -1429,7 +1429,13 @@
>> }
>>
>> setEffectiveUser();
>> - debugs(0, 0, "Creating Swap Directories");
>> +
>> + if(Config.cacheSwap.n_configured == 0) {
>> + debugs(0, 0, "There is no swap directory configured,
>> please configure it using cache_dir");
>> + } else {
>> + debugs(0, 0, "Creating Swap Directories");
>> + }
>> +
>> Store::Root().create();
>>
>> return 0;
>>
>>
>> btw, Merry Xmas, Eliezer!
>>
>> Best,
>> Tianyin
>>
>>
>> On Mon, Dec 24, 2012 at 10:39 AM, Eliezer Croitoru <eliezer_at_ngtech.co.il>
>> wrote:
>>>
>>> I think it worth to have a more accurate log such as:
>>> no cache_dir or any other more informative msg.
>>> But the basics of squid is that it wont create if none exists in settings
>>> and will show some data when trying to access one.
>>>
>>> Eliezer
>>>
>>>
>>> On 12/24/2012 11:54 AM, Tianyin Xu wrote:
>>>>
>>>>
>>>> Jackie, it's not a hang but an exit(). I think that nothing is created
>>>> because you didn't configure cache_dir.
>>>>
>>>> Look at the code in src/store_dir.cc:
>>>>
>>>> 907 void
>>>> 908 StoreHashIndex::create()
>>>> 909 {
>>>> 910 for (int i = 0; i < Config.cacheSwap.n_configured; ++i) {
>>>> 911 if (dir(i).active())
>>>> 912 store(i)->create();
>>>> 913 }
>>>> 914 }
>>>>
>>>> If cache_dir is not configured, nothing will be created. But I think
>>>> this worth to have a patch that print out an accurate log. "Creating
>>>> Swap Directories" gives users the impression of creating something but
>>>> actually it creates nothing.
>>>>
>>>> T
>>>>
>>>> On Mon, Dec 24, 2012 at 1:22 AM, Jackie Zhang
>>>> <jackie.qq.zhang_at_gmail.com>
>>>> wrote:
>>>>>
>>>>>
>>>>> Thanks a lot, Michael!
>>>>>
>>>>> I installed squid in my home directory. So the user and group should be
>>>>> ok.
>>>>>
>>>>> Yes, I cleaned the directories according to your suggestion. But squid
>>>>> still hangs at the log "kid1| Creating Swap Directories". And it seems
>>>>> that nothing happened after I press enter.
>>>>>
>>>>> Best regards,
>>>>> Jackie
>>>>>
>>>>> On Mon, Dec 24, 2012 at 1:21 AM, Jackie Zhang
>>>>> <jackie.qq.zhang_at_gmail.com>
>>>>> wrote:
>>>>>>
>>>>>>
>>>>>> Thanks a lot, Michael!
>>>>>>
>>>>>> I installed squid in my home directory. So the user and group should
>>>>>> be
>>>>>> ok.
>>>>>>
>>>>>> Yes, I cleaned the directories according to your suggestion. But squid
>>>>>> still hangs at the log "kid1| Creating Swap Directories". And it seems
>>>>>> that nothing happened after I press enter.
>>>>>>
>>>>>> Best regards,
>>>>>> Jackie
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> --
>>> Eliezer Croitoru
>>> https://www1.ngtech.co.il
>>> sip:ngtech_at_sip2sip.info
>>> IT consulting for Nonprofit organizations
>>> eliezer <at> ngtech.co.il
>>
>>
>>
>>
>
> --
> Eliezer Croitoru
> https://www1.ngtech.co.il
> sip:ngtech_at_sip2sip.info
> IT consulting for Nonprofit organizations
> eliezer <at> ngtech.co.il
-- Tianyin XU, http://cseweb.ucsd.edu/~tixu/Received on Mon Dec 24 2012 - 21:11:15 MST
This archive was generated by hypermail 2.2.0 : Tue Dec 25 2012 - 12:00:04 MST