Skip to content

Commit 074dee9

Browse files
committed
qa/suites/tasks/cbt.py: Deprecating cosbench from Teuthology in preparation for deletion of cosbench support
from CBT. The code being deleting is infrastructure code, no qa test suite uses this function. Therefore it can be safely deleted. Signed-off-by: Lee Sanders <[email protected]>
1 parent 59df66b commit 074dee9

File tree

1 file changed

+2
-129
lines changed

1 file changed

+2
-129
lines changed

qa/tasks/cbt.py

Lines changed: 2 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,11 @@ def generate_cbt_config(self):
4747

4848
benchmark_config = self.config.get('benchmarks')
4949
benchmark_type = next(iter(benchmark_config.keys()))
50+
5051
if benchmark_type in ['librbdfio', 'fio']:
5152
testdir = misc.get_testdir(self.ctx)
5253
benchmark_config[benchmark_type]['cmd_path'] = os.path.join(testdir, 'fio/fio')
53-
if benchmark_type == 'cosbench':
54-
# create cosbench_dir and cosbench_xml_dir
55-
testdir = misc.get_testdir(self.ctx)
56-
benchmark_config['cosbench']['cosbench_dir'] = os.path.join(testdir, 'cos')
57-
benchmark_config['cosbench']['cosbench_xml_dir'] = os.path.join(testdir, 'xml')
58-
self.ctx.cluster.run(args=['mkdir', '-p', '-m0755', '--', benchmark_config['cosbench']['cosbench_xml_dir']])
59-
benchmark_config['cosbench']['controller'] = osd_hosts[0]
60-
61-
# set auth details
62-
remotes_and_roles = self.ctx.cluster.remotes.items()
63-
ips = [host for (host, port) in
64-
(remote.ssh.get_transport().getpeername() for (remote, role_list) in remotes_and_roles)]
65-
benchmark_config['cosbench']['auth'] = "username=cosbench:operator;password=intel2012;url=http://%s:80/auth/v1.0;retry=9" %(ips[0])
54+
6655
client_endpoints_config = self.config.get('client_endpoints', None)
6756
monitoring_profiles = self.config.get('monitoring_profiles', {})
6857

@@ -117,77 +106,6 @@ def install_dependencies(self):
117106
]
118107
)
119108

120-
if benchmark_type == 'cosbench':
121-
# install cosbench
122-
self.log.info('install dependencies for cosbench')
123-
if system_type == 'rpm':
124-
cosbench_depends = ['wget', 'unzip', 'java-1.7.0-openjdk', 'curl']
125-
else:
126-
cosbench_depends = ['wget', 'unzip', 'openjdk-8-jre', 'curl']
127-
self.first_mon.run(args=install_cmd + cosbench_depends)
128-
testdir = misc.get_testdir(self.ctx)
129-
cosbench_version = '0.4.2.c3'
130-
cosbench_location = 'https://github.com/intel-cloud/cosbench/releases/download/v0.4.2.c3/0.4.2.c3.zip'
131-
os_version = misc.get_system_type(self.first_mon, False, True)
132-
133-
# additional requirements for bionic
134-
if os_version == '18.04':
135-
self.first_mon.run(
136-
args=['sudo', 'apt-get', '-y', 'purge', 'openjdk-11*'])
137-
# use our own version of cosbench
138-
cosbench_version = 'cosbench-0.4.2.c3.1'
139-
# contains additional parameter "-N" to nc
140-
cosbench_location = 'http://drop.ceph.com/qa/cosbench-0.4.2.c3.1.zip'
141-
cosbench_dir = os.path.join(testdir, cosbench_version)
142-
self.ctx.cluster.run(args=['mkdir', '-p', '-m0755', '--', cosbench_dir])
143-
self.first_mon.run(
144-
args=[
145-
'cd', testdir, run.Raw('&&'),
146-
'wget',
147-
cosbench_location, run.Raw('&&'),
148-
'unzip', '{name}.zip'.format(name=cosbench_version), '-d', cosbench_version
149-
]
150-
)
151-
else:
152-
self.first_mon.run(
153-
args=[
154-
'cd', testdir, run.Raw('&&'),
155-
'wget',
156-
cosbench_location, run.Raw('&&'),
157-
'unzip', '{name}.zip'.format(name=cosbench_version)
158-
]
159-
)
160-
self.first_mon.run(
161-
args=[
162-
'cd', testdir, run.Raw('&&'),
163-
'ln', '-s', cosbench_version, 'cos',
164-
]
165-
)
166-
self.first_mon.run(
167-
args=[
168-
'cd', os.path.join(testdir, 'cos'), run.Raw('&&'),
169-
'chmod', '+x', run.Raw('*.sh'),
170-
]
171-
)
172-
173-
# start cosbench and check info
174-
self.log.info('start cosbench')
175-
self.first_mon.run(
176-
args=[
177-
'cd', testdir, run.Raw('&&'),
178-
'cd', 'cos', run.Raw('&&'),
179-
'sh', 'start-all.sh'
180-
]
181-
)
182-
self.log.info('check cosbench info')
183-
self.first_mon.run(
184-
args=[
185-
'cd', testdir, run.Raw('&&'),
186-
'cd', 'cos', run.Raw('&&'),
187-
'sh', 'cli.sh', 'info'
188-
]
189-
)
190-
191109
def checkout_cbt(self):
192110
testdir = misc.get_testdir(self.ctx)
193111
repo = self.config.get('repo', 'https://github.com/ceph/cbt.git')
@@ -269,51 +187,6 @@ def end(self):
269187
]
270188
)
271189

272-
if benchmark_type == 'cosbench':
273-
os_version = misc.get_system_type(self.first_mon, False, True)
274-
if os_version == '18.04':
275-
cosbench_version = 'cosbench-0.4.2.c3.1'
276-
else:
277-
cosbench_version = '0.4.2.c3'
278-
# note: stop-all requires 'nc'
279-
self.first_mon.run(
280-
args=[
281-
'cd', testdir, run.Raw('&&'),
282-
'cd', 'cos', run.Raw('&&'),
283-
'sh', 'stop-all.sh',
284-
run.Raw('||'), 'true'
285-
]
286-
)
287-
self.first_mon.run(
288-
args=[
289-
'sudo', 'killall', '-9', 'java',
290-
run.Raw('||'), 'true'
291-
]
292-
)
293-
self.first_mon.run(
294-
args=[
295-
'rm', '--one-file-system', '-rf', '--',
296-
'{tdir}/cos'.format(tdir=testdir),
297-
]
298-
)
299-
self.first_mon.run(
300-
args=[
301-
'rm', '--one-file-system', '-rf', '--',
302-
'{tdir}/{version}'.format(tdir=testdir, version=cosbench_version),
303-
]
304-
)
305-
self.first_mon.run(
306-
args=[
307-
'rm', '--one-file-system', '-rf', '--',
308-
'{tdir}/{version}.zip'.format(tdir=testdir, version=cosbench_version),
309-
]
310-
)
311-
self.first_mon.run(
312-
args=[
313-
'rm', '--one-file-system', '-rf', '--',
314-
'{tdir}/xml'.format(tdir=testdir),
315-
]
316-
)
317190
# Collect cbt performance data
318191
cbt_performance = CBTperformance()
319192
cbt_performance.collect(self.ctx, self.config)

0 commit comments

Comments
 (0)