Skip to content

Commit 4c707c6

Browse files
committed
Run xrootd on a different port so it doesn't conflict w/ stashcache
1 parent d401ffd commit 4c707c6

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

osgtest/tests/test_150_xrootd.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
import osgtest.library.service as service
66
import osgtest.library.osgunittest as osgunittest
77

8+
9+
XROOTD_PORT = 1096 # chosen so it doesn't conflict w/ the stashcache instances
10+
811
XROOTD_CFG_TEXT = """\
912
cms.space min 2g 5g
1013
xrootd.seclib /usr/lib64/libXrdSec-4.so
@@ -17,6 +20,7 @@
1720
%s
1821
acc.authdb /etc/xrootd/auth_file
1922
ofs.authorize
23+
xrd.port %d
2024
"""
2125

2226
AUTHFILE_TEXT = """\
@@ -32,6 +36,7 @@ def test_01_start_xrootd(self):
3236
core.config['certs.xrootdcert'] = '/etc/grid-security/xrd/xrdcert.pem'
3337
core.config['certs.xrootdkey'] = '/etc/grid-security/xrd/xrdkey.pem'
3438
core.config['xrootd.config'] = '/etc/xrootd/xrootd-clustered.cfg'
39+
core.config['xrootd.port'] = XROOTD_PORT
3540
core.config['xrootd.gsi'] = "ON"
3641
core.state['xrootd.started-server'] = False
3742
core.state['xrootd.backups-exist'] = False
@@ -58,7 +63,7 @@ def test_01_start_xrootd(self):
5863
owner="xrootd",
5964
chown=(user.pw_uid, user.pw_gid))
6065

61-
files.append(core.config['xrootd.config'], XROOTD_CFG_TEXT % sec_protocol, owner='xrootd', backup=True)
66+
files.append(core.config['xrootd.config'], XROOTD_CFG_TEXT % (sec_protocol, core.config['xrootd.port']), owner='xrootd', backup=True)
6267
authfile = '/etc/xrootd/auth_file'
6368
files.write(authfile, AUTHFILE_TEXT, owner="xrootd", chown=(user.pw_uid, user.pw_gid))
6469

osgtest/tests/test_450_xrootd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def test_01_xrdcp_local_to_server(self):
3030
else:
3131
temp_dir = tempfile.mkdtemp()
3232
os.chmod(temp_dir, 0o777)
33-
xrootd_url = 'root://%s/%s/copied_file.txt' % (hostname, temp_dir)
33+
xrootd_url = 'root://%s:%d/%s/copied_file.txt' % (hostname, core.config['xrootd.port'], temp_dir)
3434
command = ('xrdcp', '--debug', '3', TestXrootd.__data_path, xrootd_url)
3535

3636
status, stdout, stderr = core.system(command, user=True)
@@ -57,7 +57,7 @@ def test_02_xrdcp_server_to_local(self):
5757
f = open(temp_source_dir + "/copied_file.txt", "w")
5858
f.write("This is some test data for an xrootd test.")
5959
f.close()
60-
xrootd_url = 'root://%s/%s/copied_file.txt' % (hostname, temp_source_dir)
60+
xrootd_url = 'root://%s:%d/%s/copied_file.txt' % (hostname, core.config['xrootd.port'], temp_source_dir)
6161
local_path = temp_target_dir + '/copied_file.txt'
6262
command = ('xrdcp', '--debug', '3', xrootd_url, local_path)
6363

0 commit comments

Comments
 (0)