Merge lp:~dobey/ubuntuone-dev-tools/ncsa-changed into lp:ubuntuone-dev-tools

Proposed by dobey
Status: Merged
Approved by: dobey
Approved revision: 107
Merged at revision: 106
Proposed branch: lp:~dobey/ubuntuone-dev-tools/ncsa-changed
Merge into: lp:ubuntuone-dev-tools
Diff against target: 102 lines (+19/-15)
4 files modified
data/squid.conf.in (+0/-4)
ubuntuone/devtools/services/squid.py (+12/-6)
ubuntuone/devtools/services/tests/test_squid_linux.py (+2/-2)
ubuntuone/devtools/services/tests/test_squid_windows.py (+5/-3)
To merge this branch: bzr merge lp:~dobey/ubuntuone-dev-tools/ncsa-changed
Reviewer Review Type Date Requested Status
Mike McCracken (community) Approve
Roberto Alsina (community) Approve
Review via email: mp+186438@code.launchpad.net

Commit message

Fixes to work with squid 3.3.8.

To post a comment you must log in.
Revision history for this message
Roberto Alsina (ralsina) :
review: Approve
Revision history for this message
Mike McCracken (mikemc) wrote :

looks OK, I didn't test it on darwin (paths will be different) or windows (I don't have a working windows VM at the moment)

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (42.2 KiB)

The attempt to merge lp:~dobey/ubuntuone-dev-tools/ncsa-changed into lp:ubuntuone-dev-tools failed. Below is the output from the failed tests.

Starting squid version...
Waiting for squid to start....
Waiting for squid to start.....
Waiting for squid to start......
Waiting for squid to start.......
Waiting for squid to start........
Waiting for squid to start.........
Waiting for squid to start..........
Waiting for squid to start...........

Traceback (most recent call last):
  File "bin/u1trial", line 40, in <module>
    main()
  File "/mnt/tarmac/cache/ubuntuone-dev-tools/trunk/ubuntuone/devtools/runners/__init__.py", line 290, in main
    service.start_service(tempdir=test_runner.tempdir)
  File "/mnt/tarmac/cache/ubuntuone-dev-tools/trunk/ubuntuone/devtools/services/squid.py", line 309, in start_service
    raise SquidLaunchError(msg)
ubuntuone.devtools.services.squid.SquidLaunchError: Could not start squid:
stdout:

stderr
2013/09/18 23:38:50.566| debug.cc(424) parseOptions: command-line -X overrides: ALL,7
2013/09/18 23:38:50.566| cache_manager.cc(102) registerProfile: registering legacy mem
2013/09/18 23:38:50.566| cache_manager.cc(87) registerProfile: registered profile: mem
2013/09/18 23:38:50.566| cache_manager.cc(87) registerProfile: registered profile: diskd
2013/09/18 23:38:50.566| cache_manager.cc(102) registerProfile: registering legacy squidaio_counts
2013/09/18 23:38:50.566| cache_manager.cc(87) registerProfile: registered profile: squidaio_counts
2013/09/18 23:38:50.566| rock/RockStoreFileSystem.cc(44) setup: Will use Rock FS
2013/09/18 23:38:50.566| Startup: Initializing Authentication Schemes ...
2013/09/18 23:38:50.566| Startup: Initialized Authentication Scheme 'basic'
2013/09/18 23:38:50.566| Startup: Initialized Authentication Scheme 'digest'
2013/09/18 23:38:50.566| Startup: Initialized Authentication Scheme 'negotiate'
2013/09/18 23:38:50.566| Startup: Initialized Authentication Scheme 'ntlm'
2013/09/18 23:38:50.566| Startup: Initialized Authentication.
2013/09/18 23:38:50.566| tools.cc(69) ProbeTransport: Detected IPv6 hybrid or v4-mapping stack...
2013/09/18 23:38:50.566| tools.cc(83) ProbeTransport: IPv6 transport Enabled
2013/09/18 23:38:50.580| Config.cc(39) registerTokens: register format tokens for 'adapt'
2013/09/18 23:38:50.580| Config.cc(39) registerTokens: register format tokens for 'icap'
2013/09/18 23:38:50.580| cache_cf.cc(609) parseConfigFile:
2013/09/18 23:38:50.580| cf_parser.cci(3192) free_all:
2013/09/18 23:38:50.594| Gadgets.cc(245) aclDestroyAcls: aclDestroyACLs: invoked
2013/09/18 23:38:50.595| Acl.cc(400) Registered: ACL::Prototype::Registered: invoked for type src
2013/09/18 23:38:50.595| Acl.cc(404) Registered: ACL::Prototype::Registered: yes
2013/09/18 23:38:50.595| Acl.cc(61) FindByName: ACL::FindByName 'all'
2013/09/18 23:38:50.595| Acl.cc(67) FindByName: ACL::FindByName found no match
2013/09/18 23:38:50.595| Acl.cc(161) ParseAclLine: aclParseAclLine: Creating ACL 'all'
2013/09/18 23:38:50.595| Acl.cc(436) Factory: ACL::Prototype::Factory: cloning an object for type 'src'
2013/09/18 23:38:50.595| Ip.cc(260) FactoryParse: aclIpParseIpData: all
2013/09/18 23:38:50.595| Ip.cc(264) Fa...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'data/squid.conf.in'
--- data/squid.conf.in 2012-04-24 17:58:16 +0000
+++ data/squid.conf.in 2013-09-18 20:21:43 +0000
@@ -2,7 +2,6 @@
2# Use a default auth using ncsa and the passed generated file.2# Use a default auth using ncsa and the passed generated file.
3auth_param basic program ${auth_process} ${auth_file}3auth_param basic program ${auth_process} ${auth_file}
4#Recommended minimum configuration:4#Recommended minimum configuration:
5acl manager proto cache_object
6acl localhost src 127.0.0.1/325acl localhost src 127.0.0.1/32
7acl to_localhost dst 127.0.0.0/326acl to_localhost dst 127.0.0.0/32
8#7#
@@ -46,9 +45,6 @@
4645
47#Recommended minimum configuration:46#Recommended minimum configuration:
48#47#
49# Only allow cachemgr access from localhost
50http_access allow manager localhost
51http_access deny manager
52# Only allow purge requests from localhost48# Only allow purge requests from localhost
53http_access allow purge localhost49http_access allow purge localhost
54http_access deny purge50http_access deny purge
5551
=== modified file 'ubuntuone/devtools/services/squid.py'
--- ubuntuone/devtools/services/squid.py 2013-02-08 19:38:02 +0000
+++ ubuntuone/devtools/services/squid.py 2013-09-18 20:21:43 +0000
@@ -50,14 +50,15 @@
50 get_arbitrary_port,50 get_arbitrary_port,
51)51)
5252
53# pylint: disable=C010353NCSA_BASIC_PREFIX = 'basic_'
54if sys.platform == 'win32':54if sys.platform == 'win32':
55 AUTH_PROCESS_PATH = r'C:\squid\libexec\ncsa_auth.exe'55 AUTH_PROCESS_PATH = 'C:\\squid\\libexec\\'
56 AUTH_PROCESS_NAME = 'ncsa_auth.exe'
56 SQUID_START_ARGS = ['-f']57 SQUID_START_ARGS = ['-f']
57else:58else:
58 AUTH_PROCESS_PATH = '/usr/lib/%s/ncsa_auth'59 AUTH_PROCESS_PATH = '/usr/lib/%s/'
60 AUTH_PROCESS_NAME = 'ncsa_auth'
59 SQUID_START_ARGS = ['-N', '-X', '-f']61 SQUID_START_ARGS = ['-N', '-X', '-f']
60# pylint: enable=C0103
6162
62SQUID_CONFIG_FILE = 'squid.conf.in'63SQUID_CONFIG_FILE = 'squid.conf.in'
63SQUID_DIR = 'squid'64SQUID_DIR = 'squid'
@@ -77,11 +78,16 @@
77 if sys.platform == 'win32':78 if sys.platform == 'win32':
78 path = find_executable('ncsa_auth')79 path = find_executable('ncsa_auth')
79 if path is None:80 if path is None:
80 path = AUTH_PROCESS_PATH81 path = AUTH_PROCESS_PATH + NCSA_BASIC_PREFIX + AUTH_PROCESS_NAME
82 if not exists(path):
83 path = AUTH_PROCESS_PATH + AUTH_PROCESS_NAME
81 return format_config_path(path)84 return format_config_path(path)
82 else:85 else:
83 squid = 'squid3' if squid_version == 3 else 'squid'86 squid = 'squid3' if squid_version == 3 else 'squid'
84 path = AUTH_PROCESS_PATH % squid87 auth_path = (AUTH_PROCESS_PATH % squid)
88 path = auth_path + NCSA_BASIC_PREFIX + AUTH_PROCESS_NAME
89 if not exists(path):
90 path = auth_path + AUTH_PROCESS_NAME
85 return path91 return path
8692
8793
8894
=== modified file 'ubuntuone/devtools/services/tests/test_squid_linux.py'
--- ubuntuone/devtools/services/tests/test_squid_linux.py 2012-04-26 14:52:43 +0000
+++ ubuntuone/devtools/services/tests/test_squid_linux.py 2013-09-18 20:21:43 +0000
@@ -40,12 +40,12 @@
40 def test_get_auth_process_3(self):40 def test_get_auth_process_3(self):
41 """Test getting the auth process for squid3."""41 """Test getting the auth process for squid3."""
42 expected = squid.AUTH_PROCESS_PATH % 'squid3'42 expected = squid.AUTH_PROCESS_PATH % 'squid3'
43 self.assertEqual(expected, squid.get_auth_process_path(3))43 self.assertTrue(squid.get_auth_process_path(3).startswith(expected))
4444
45 def test_get_auth_process(self):45 def test_get_auth_process(self):
46 """Test getting the auth process."""46 """Test getting the auth process."""
47 expected = squid.AUTH_PROCESS_PATH % 'squid'47 expected = squid.AUTH_PROCESS_PATH % 'squid'
48 self.assertEqual(expected, squid.get_auth_process_path(2))48 self.assertTrue(squid.get_auth_process_path(2).startswith(expected))
4949
50 def test_format_config_path(self):50 def test_format_config_path(self):
51 """Test formating a config path."""51 """Test formating a config path."""
5252
=== modified file 'ubuntuone/devtools/services/tests/test_squid_windows.py'
--- ubuntuone/devtools/services/tests/test_squid_windows.py 2012-04-26 14:52:43 +0000
+++ ubuntuone/devtools/services/tests/test_squid_windows.py 2013-09-18 20:21:43 +0000
@@ -52,9 +52,11 @@
52 return path52 return path
5353
54 self.patch(squid, 'format_config_path', fake_format)54 self.patch(squid, 'format_config_path', fake_format)
55 self.assertEqual(squid.AUTH_PROCESS_PATH,55 self.assertTrue(squid.get_auth_process_path(3).startswith(
56 squid.get_auth_process_path(3))56 squid.AUTH_PROCESS_PATH))
57 self.assertIn(('format', squid.AUTH_PROCESS_PATH), called)57 self.assertIn(('format',
58 squid.AUTH_PROCESS_PATH + squid.AUTH_PROCESS_NAME),
59 called)
5860
59 def test_get_auth_process_path(self):61 def test_get_auth_process_path(self):
60 """Test getting the auth process."""62 """Test getting the auth process."""

Subscribers

People subscribed via source and target branches

to all changes: