Bug 1353 - share internet connection : squid cache fails
Summary: share internet connection : squid cache fails
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 1
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard:
Keywords: validated_update
Depends on:
Blocks:
 
Reported: 2011-05-20 10:57 CEST by José Jorge
Modified: 2011-12-23 21:19 CET (History)
3 users (show)

See Also:
Source RPM: drakwizard
CVE:
Status comment:


Attachments

Description José Jorge 2011-05-20 10:57:54 CEST
Description of problem:
I tried to use the wizard in MCC->Network->Share network connection. It writes a custom /etc/squid/squid.conf file. The file refers to a /usr/share/squid/errors/templates/ERR_CUSTOM_ACCESS_DENIED file that does not exist.

This prevents squid from starting. Only creating an empty file works.

How reproducible:
always
Comment 1 Manuel Hiebel 2011-10-03 01:09:22 CEST
Is this bug still valid with the update of squid ? (in update_testing for mageia1)
Comment 2 José Jorge 2011-10-03 10:04:06 CEST
Yes : this file is still missing, and MCC still asks for it in squid.conf.
A very simple patch would be asking for ERR_ACCESS_DENIED instead of ERR_CUSTOM_ACCESS_DENIED.

I feel this is inserted in /usr/share/wizards/proxy_wizard/scripts/squid.conf.default
Comment 3 Manuel Hiebel 2011-10-03 11:56:32 CEST
Ok, thanks. I assign to the maintainer.

Keywords: (none) => PATCH
Version: Cauldron => 1
Assignee: bugsquad => thierry.vignaud

Comment 4 José Jorge 2011-12-05 11:27:12 CET
I fixed it in trunk SVN, simply changing ERR_CUSTOM_ACCESS_DENIED to ERR_CACHE_ACCESS_DENIED.

I try now to apply it to MGA1 and release an update.
Comment 5 José Jorge 2011-12-05 12:09:29 CET
drakx-net-0.97.2-1.mga1 submitted to testing, please QA : test it.

Test case : share an internet connection from MCC without changing anything.
Even if squid was configured, the squid process does not run.
Watch the /var/log/squid/ files : it complains about ERR_CUSTOM not found.

Apply this update, reconfigure internet share. Squid process should be running.

Keywords: PATCH => (none)
Status: NEW => ASSIGNED
Assignee: thierry.vignaud => qa-bugs

Comment 6 claire robinson 2011-12-14 13:07:03 CET
x86_64

Before:
/var/log/squid/cache.log


2011/12/14 11:56:33| errorpage.cc(293) errorTryLoadText: '/usr/share/squid/errors/templates/ERR_CUSTOM_ACCESS_DENIED': (2) No such file or directory
FATAL: failed to find or read error text file.
Squid Cache (Version 3.1.15): Terminated abnormally.


Update:
The following 4 packages are going to be installed:

- drakx-net-0.97.2-1.mga1.noarch
- drakx-net-applet-0.97.2-1.mga1.noarch
- drakx-net-text-0.97.2-1.mga1.noarch
- libdrakx-net-0.97.2-1.mga1.noarch

After:
2011/12/14 12:06:59| Starting Squid Cache version 3.1.15 for x86_64-mageia-linux-gnu...
2011/12/14 12:06:59| Process ID 658
2011/12/14 12:06:59| With 1024 file descriptors available
2011/12/14 12:06:59| Initializing IP Cache...

Seems OK x86_64
Comment 7 claire robinson 2011-12-14 13:11:54 CET
I should specify.

I wasn't able to test the connection was actually shared as I don't have two physical adapters but the problem with squid seems to be resolved. I cancelled the sharing process before it completed.
Comment 8 Dave Hodgins 2011-12-17 01:13:20 CET
Rather then having the user reconfigure the interface after installing the update,
I'd like to have a postinstall scriptlet fix the error.

cd /etc/squid && sed 's/CUSTOM/CACHE/' squid.conf>squid.conf.rpmnew && mv squid.conf squid.conf.rpmsave && mv squid.conf.rpmnew squid.conf && service squid start

The above should be safe, as it'll stop at the first command that fails, if squid
is not installed, etc.

A comment should be included, that the scriptlet should be removed in any future
updates.

Testing complete on i586 if you choose not to include the postinstall scriptlet.

For testing, I used a VB with two network interfaces defined.

CC: (none) => davidwhodgins

Comment 9 claire robinson 2011-12-20 17:41:03 CET
What do you think José? 

looks good to me :)
Comment 10 José Jorge 2011-12-21 10:08:57 CET
(In reply to comment #8)
> Testing complete on i586 if you choose not to include the postinstall
> scriptlet.
> 

I think we should just push : current mageia systems can't share connection with squid proxy. So anyone using it has disabled squid transparent cache. To get the benefit of the update, he has to reconfigure anyway...
Comment 11 Dave Hodgins 2011-12-21 23:45:41 CET
Validating the update.

Could someone from the sysadmin team push the srpm
drakx-net-0.97.2-1.mga1.src.rpm
from Core Updates Testing to Core Updates

Advisory:
This update to drakx-net corrects a configuration error that prevented the
squid proxy server from starting, when mcc is used to share the internet
connection.

https://bugs.mageia.org/show_bug.cgi?id=1353

Keywords: (none) => validated_update
CC: (none) => sysadmin-bugs

Comment 12 Thomas Backlund 2011-12-23 21:19:09 CET
Update pushed.

Status: ASSIGNED => RESOLVED
CC: (none) => tmb
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.