Merge lp:~notmyname/swift/stats_log_fix into lp:~hudson-openstack/swift/trunk

Proposed by John Dickinson
Status: Merged
Approved by: Chuck Thier
Approved revision: 146
Merged at revision: 146
Proposed branch: lp:~notmyname/swift/stats_log_fix
Merge into: lp:~hudson-openstack/swift/trunk
Diff against target: 38 lines (+3/-3)
3 files modified
etc/log-processing.conf-sample (+1/-1)
swift/stats/access_processor.py (+1/-1)
test/unit/stats/test_log_processor.py (+1/-1)
To merge this branch: bzr merge lp:~notmyname/swift/stats_log_fix
Reviewer Review Type Date Requested Status
Chuck Thier (community) Approve
Review via email: mp+43904@code.launchpad.net

Description of the change

changes default server_name in access log processor to match the default server name in the proxy server

To post a comment you must log in.
Revision history for this message
Chuck Thier (cthier) wrote :

looks good

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'etc/log-processing.conf-sample'
2--- etc/log-processing.conf-sample 2010-10-04 21:12:43 +0000
3+++ etc/log-processing.conf-sample 2010-12-16 14:06:31 +0000
4@@ -23,7 +23,7 @@
5 # load balancer private ips is for load balancer ip addresses that should be
6 # counted as servicenet
7 # lb_private_ips =
8-# server_name = proxy
9+# server_name = proxy-server
10 # user = swift
11 # warn_percent = 0.8
12
13
14=== modified file 'swift/stats/access_processor.py'
15--- swift/stats/access_processor.py 2010-11-01 21:47:48 +0000
16+++ swift/stats/access_processor.py 2010-12-16 14:06:31 +0000
17@@ -26,7 +26,7 @@
18 """Transform proxy server access logs"""
19
20 def __init__(self, conf):
21- self.server_name = conf.get('server_name', 'proxy')
22+ self.server_name = conf.get('server_name', 'proxy-server')
23 self.lb_private_ips = [x.strip() for x in \
24 conf.get('lb_private_ips', '').split(',')\
25 if x.strip()]
26
27=== modified file 'test/unit/stats/test_log_processor.py'
28--- test/unit/stats/test_log_processor.py 2010-11-22 23:30:37 +0000
29+++ test/unit/stats/test_log_processor.py 2010-12-16 14:06:31 +0000
30@@ -65,7 +65,7 @@
31
32 class TestLogProcessor(unittest.TestCase):
33
34- access_test_line = 'Jul 9 04:14:30 saio proxy 1.2.3.4 4.5.6.7 '\
35+ access_test_line = 'Jul 9 04:14:30 saio proxy-server 1.2.3.4 4.5.6.7 '\
36 '09/Jul/2010/04/14/30 GET '\
37 '/v1/acct/foo/bar?format=json&foo HTTP/1.0 200 - '\
38 'curl tk4e350daf-9338-4cc6-aabb-090e49babfbd '\