Skip to content

Commit 54ebb43

Browse files
authored
Merge pull request ceph#52444 from pritha-srivastava/wip-rgw-d4n
d4n topic branch Reviewed-by: Ali Maredia <[email protected]>
2 parents becfb26 + 2864bc6 commit 54ebb43

36 files changed

+5653
-3164
lines changed

.gitmodules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@
5959
[submodule "s3select"]
6060
path = src/s3select
6161
url = https://github.com/ceph/s3select.git
62-
[submodule "src/cpp_redis"]
63-
path = src/cpp_redis
64-
url = https://github.com/ceph/cpp_redis.git
6562
[submodule "src/libkmip"]
6663
path = src/libkmip
6764
url = https://github.com/ceph/libkmip
@@ -81,3 +78,6 @@
8178
[submodule "src/qatzip"]
8279
path = src/qatzip
8380
url = https://github.com/intel/qatzip.git
81+
[submodule "src/boost_redis"]
82+
path = src/boost_redis
83+
url = https://github.com/boostorg/redis.git

cmake/modules/BuildBoost.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
# Boost_USE_STATIC_LIBS : boolean (default: OFF)
1212
# Boost_USE_MULTITHREADED : boolean (default: OFF)
1313
# BOOST_J: integer (defanult 1)
14+
#
15+
# Note: Remove boost_redis submodule once upgraded to Boost version that includes it
1416

1517
function(check_boost_version source_dir expected_version)
1618
set(version_hpp "${source_dir}/boost/version.hpp")

qa/suites/rgw/d4n/tasks/rgw_d4ntests.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ tasks:
55
deb: ['s3cmd', 'redis']
66
rpm: ['s3cmd', 'redis']
77
- ceph:
8+
- redis:
9+
client.0:
810
- rgw: [client.0]
911
- tox: [client.0]
1012
- exec:

qa/tasks/d4ntests.py

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,10 @@
22

33
from teuthology import misc as teuthology
44
from teuthology.task import Task
5-
from teuthology.orchestra import run
65
from teuthology.packaging import remove_package
76

87
log = logging.getLogger(__name__)
98

10-
def get_toxvenv_dir(ctx):
11-
return ctx.tox.venv_path
12-
13-
def toxvenv_sh(ctx, remote, args, **kwargs):
14-
activate = get_toxvenv_dir(ctx) + '/bin/activate'
15-
return remote.sh(['source', activate, run.Raw('&&')] + args, **kwargs)
16-
179
display_name='Foo'
1810
1911
access_key='test3'
@@ -50,14 +42,11 @@ def begin(self):
5042
log.debug('D4N Tests: Host is: {host}'.format(host=host))
5143

5244
self.create_user()
53-
self.redis_startup()
5445

5546
def end(self):
5647
super(D4NTests, self).end()
5748
log.info('D4N Tests: END')
5849

59-
self.redis_shutdown()
60-
6150
for client in self.all_clients:
6251
self.remove_packages(client)
6352
self.delete_user(client)
@@ -92,41 +81,9 @@ def create_user(self):
9281
],
9382
)
9483

95-
def redis_startup(self):
96-
try:
97-
for client in self.all_clients:
98-
self.ctx.cluster.only(client).run(
99-
args=[
100-
'sudo',
101-
'redis-server',
102-
'--daemonize',
103-
'yes'
104-
],
105-
)
106-
107-
except Exception as err:
108-
log.debug('D4N Tests: Error starting up a Redis server')
109-
log.debug(err)
110-
111-
def redis_shutdown(self):
112-
try:
113-
for client in self.all_clients:
114-
self.ctx.cluster.only(client).run(
115-
args=[
116-
'sudo',
117-
'redis-cli',
118-
'shutdown',
119-
],
120-
)
121-
122-
except Exception as err:
123-
log.debug('D4N Tests: Error shutting down a Redis server')
124-
log.debug(err)
125-
12684
def remove_packages(self, client):
12785
(remote,) = self.ctx.cluster.only(client).remotes.keys()
12886
remove_package('s3cmd', remote)
129-
remove_package('redis', remote)
13087

13188
def delete_user(self, client):
13289
log.info("D4N Tests: Deleting S3 user...")

qa/tasks/redis.py

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import logging
2+
3+
from teuthology import misc as teuthology
4+
from teuthology.task import Task
5+
from teuthology.packaging import remove_package
6+
7+
log = logging.getLogger(__name__)
8+
9+
class Redis(Task):
10+
11+
def __init__(self, ctx, config):
12+
super(Redis, self).__init__(ctx, config)
13+
self.log = log
14+
log.info('Redis Task: __INIT__ ')
15+
16+
clients = ['client.{id}'.format(id=id_)
17+
for id_ in teuthology.all_roles_of_type(self.ctx.cluster, 'client')]
18+
self.all_clients = []
19+
for client in clients:
20+
if client in self.config:
21+
self.all_clients.extend([client])
22+
if self.all_clients is None:
23+
self.all_clients = 'client.0'
24+
25+
def setup(self):
26+
super(Redis, self).setup()
27+
log.info('Redis Task: SETUP')
28+
29+
def begin(self):
30+
super(Redis, self).begin()
31+
log.info('Redis Task: BEGIN')
32+
33+
for (host, roles) in self.ctx.cluster.remotes.items():
34+
log.debug('Redis Task: Cluster config is: {cfg}'.format(cfg=roles))
35+
log.debug('Redis Task: Host is: {host}'.format(host=host))
36+
37+
self.redis_startup()
38+
39+
def end(self):
40+
super(Redis, self).end()
41+
log.info('Redis Task: END')
42+
43+
self.redis_shutdown()
44+
45+
for client in self.all_clients:
46+
self.remove_redis_package(client)
47+
48+
def redis_startup(self):
49+
try:
50+
for client in self.all_clients:
51+
self.ctx.cluster.only(client).run(
52+
args=[
53+
'sudo',
54+
'redis-server',
55+
'--daemonize',
56+
'yes'
57+
],
58+
)
59+
60+
except Exception as err:
61+
log.debug('Redis Task: Error starting up a Redis server')
62+
log.debug(err)
63+
64+
def redis_shutdown(self):
65+
try:
66+
for client in self.all_clients:
67+
self.ctx.cluster.only(client).run(
68+
args=[
69+
'sudo',
70+
'redis-cli',
71+
'shutdown',
72+
],
73+
)
74+
75+
except Exception as err:
76+
log.debug('Redis Task: Error shutting down a Redis server')
77+
log.debug(err)
78+
79+
def remove_redis_package(self, client):
80+
(remote,) = self.ctx.cluster.only(client).remotes.keys()
81+
remove_package('redis', remote)
82+
83+
task = Redis

0 commit comments

Comments
 (0)