Bug 497892

Summary: proxy, squid /var/log/squid/access.log not created in rhel 5 proxy
Product: Red Hat Satellite Proxy 5 Reporter: wes hayutin <whayutin>
Component: InstallerAssignee: Miroslav Suchý <msuchy>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Pazdziora <jpazdziora>
Severity: medium Docs Contact:
Priority: low    
Version: 530CC: bperkins, jpazdziora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: na
Whiteboard:
Fixed In Version: sat530-unconfirmed Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 500809 (view as bug list) Environment:
Last Closed: 2009-10-28 19:49:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 456999, 457079, 500809    

Description wes hayutin 2009-04-27 18:40:14 UTC
Description of problem:

4/24.1

recreate
1. install cmd line proxy w/ selinux enforcing
2. check /var/log/squid 
access log missing


install w/ selinux permissive
access.log is there

Comment 1 wes hayutin 2009-04-27 19:25:54 UTC
ignore the above selinux comments..

Comment 2 wes hayutin 2009-04-27 20:11:25 UTC
in rhel4 /var/log/squid/access.log is a default option and does not need to be in the squid.conf file.

In RHEL 5 w/ squid 2.6 we need to add a config line for /etc/squid/squid.conf to add the the logging to /var/log/squid/squid.conf

Comment 3 wes hayutin 2009-04-27 20:16:41 UTC
look in the /etc/squid/squid.conf.default for both rhel4 and rhel5

notice in rhel5
#       Note: 2.6.STABLE14 and earlier only supports a slightly different
#       and undocumented format with all uppercase LOG_FACILITY|LOG_PRIORITY
access_log /var/log/squid/access.log squid

Comment 4 Miroslav Suchý 2009-05-14 09:11:34 UTC
Hmm, the problem is that in RHEL4 the configuration option is cache_access_log, but in rhel5 it is named access_log. And we unfortunately do not have process to deploy different config files based on rhel version.

I'm going to add
 access_log /var/log/squid/access.log squid
to squid.conf. Although in is not recognized on RHEL4 and squid.out will contains after restart:
2009/05/14 10:47:56| parseConfigFile: line 12 unrecognized: 'access_log /var/log/squid/access.log squid
the squid itself will ignore it and will start without problem and will create and use /var/log/squid/access.log as it is default option on rhel4.

Comment 5 Miroslav Suchý 2009-05-14 10:17:11 UTC
Commited as 46738d005a4204a19438f82befa648e2b7df67c9

Comment 6 Jan Pazdziora 2009-07-03 11:29:43 UTC
After installing RHN Proxies RHN-Proxy-5.3.0-RHEL5-re20090625.0 on RHEL 5 with SELinux enforcing, and RHN-Proxy-5.3.0-RHEL4-re20090625.0 on RHEL 4 (see installation logs in bug 486121), using the command line installer, the /var/log/squid/access.log is created both on RHEL 5 and RHEL 4:

[root@vmware145 ~]# ls -la /var/log/squid 
total 40
drwxr-x---  2 squid squid 4096 Jun 30 15:21 .
drwxr-xr-x 14 root  root  4096 Jun 30 15:18 ..
-rw-r-----  1 squid squid    0 Jun 30 15:21 access.log
-rw-r-----  1 squid squid 2686 Jun 30 15:21 cache.log
-rw-r--r--  1 root  root    77 Jun 30 15:21 squid.out
-rw-r-----  1 squid squid    0 Jun 30 15:21 store.log
[root@vmware145 ~]# grep access_log /etc/squid/squid.conf*
/etc/squid/squid.conf:access_log /var/log/squid/access.log squid
/etc/squid/squid.conf.default:#  TAG: access_log
/etc/squid/squid.conf.default:#	access_log <filepath> [<logformat name> [acl acl ...]]
/etc/squid/squid.conf.default:#	access_log none [acl acl ...]]
/etc/squid/squid.conf.default:#	access_log syslog[:facility.priority] [format [acl1 [acl2 ....]]]
/etc/squid/squid.conf.default:access_log /var/log/squid/access.log squid
/etc/squid/squid.conf.default:#	to access.log (see access_log directive). Requests denied for

[root@vmware146 ~]# ls -la /var/log/squid
total 40
drwxr-x---   2 squid squid 4096 Jul  3 13:20 .
drwxr-xr-x  11 root  root  4096 Jul  3 13:19 ..
-rw-r--r--   1 squid squid    0 Jul  3 13:20 access.log
-rw-r--r--   1 squid squid 2242 Jul  3 13:21 cache.log
-rw-r--r--   1 root  root    77 Jul  3 13:20 squid.out
-rw-r--r--   1 squid squid    0 Jul  3 13:20 store.log
[root@vmware146 ~]# grep access_log /etc/squid/squid.conf*
/etc/squid/squid.conf.default:#  TAG: cache_access_log
/etc/squid/squid.conf.default:# cache_access_log /var/log/squid/access.log

Therefore, marking as VERIFIED.