Skip to content

Commit 0f98740

Browse files
committed
rgw/restore: Fixing teuthology restore tests
This includes * fixing `rgw_cloudtier.py` qa script * enabling `debug_rgw_restore` for cloud-transition suite * adding few debug statements Signed-off-by: Soumya Koduri <[email protected]>
1 parent 1eb0623 commit 0f98740

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

qa/suites/rgw/cloud-transition/overrides.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ overrides:
55
setuser: ceph
66
setgroup: ceph
77
debug rgw: 20
8+
debug rgw_restore: 20
89
rgw crypt s3 kms backend: testing
910
rgw crypt s3 kms encryption keys: testkey-1=YmluCmJvb3N0CmJvb3N0LWJ1aWxkCmNlcGguY29uZgo= testkey-2=aWIKTWFrZWZpbGUKbWFuCm91dApzcmMKVGVzdGluZwo=
1011
rgw crypt require ssl: false

qa/suites/rgw/cloud-transition/tasks/restore/cloud_restore_s3tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ tasks:
77
client.1:
88
port: 8001
99
- rgw-cloudtier:
10+
client.1:
1011
client.0:
1112
cloud_storage_class: CLOUDTIER-CLIENT0
1213
cloud_client: client.1

qa/suites/rgw/cloud-transition/tasks/transition/cloud_transition_s3tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ tasks:
1111
#client.3:
1212
#port: 8003
1313
- rgw-cloudtier:
14+
client.1:
1415
client.0:
1516
# cloudtier storage class params
1617
# retain_head_object = false

qa/tasks/rgw_cloudtier.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ def setup(self):
5454
clients = self.config.keys() # http://tracker.ceph.com/issues/20417
5555
for client in clients:
5656
client_config = self.config.get(client)
57-
if client_config is None:
58-
client_config = {}
5957

6058
if client_config is not None:
6159
log.info('client %s - cloudtier config is -----------------%s ', client, client_config)
@@ -118,13 +116,14 @@ def setup(self):
118116

119117
log.info('Finished Configuring rgw cloudtier ...')
120118

121-
cluster_name, daemon_type, client_id = teuthology.split_role(client)
122-
client_with_id = daemon_type + '.' + client_id
123-
self.ctx.daemons.get_daemon('rgw', client_with_id, cluster_name).restart()
124-
log.info('restarted rgw daemon ...')
119+
for client in clients:
120+
cluster_name, daemon_type, client_id = teuthology.split_role(client)
121+
client_with_id = daemon_type + '.' + client_id
122+
self.ctx.daemons.get_daemon('rgw', client_with_id, cluster_name).restart()
123+
log.info('restarted rgw daemon ...')
125124

126-
(remote,) = self.ctx.cluster.only(client).remotes.keys()
127-
wait_for_radosgw(endpoint.url(), remote)
125+
(remote,) = self.ctx.cluster.only(client).remotes.keys()
126+
wait_for_radosgw(endpoint.url(), remote)
128127

129128

130129
task = RGWCloudTier

src/rgw/rgw_restore.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@ int Restore::process_restore_entry(RestoreEntry& entry, optional_yield y)
432432
return ret;
433433
}
434434

435+
ldpp_dout(this, 10) << "Restore:: Processing restore entry of object(" << obj->get_key() << ") entry: " << entry << dendl;
435436
target_placement.inherit_from(bucket->get_placement_rule());
436437

437438
auto& attrs = obj->get_attrs();
@@ -454,11 +455,13 @@ int Restore::process_restore_entry(RestoreEntry& entry, optional_yield y)
454455
attr_iter = attrs.find(RGW_ATTR_STORAGE_CLASS);
455456
if (attr_iter != attrs.end()) {
456457
target_placement.storage_class = attr_iter->second.to_str();
458+
} else {
459+
ldpp_dout(this, -1) << __PRETTY_FUNCTION__ << ": ERROR: Attr RGW_ATTR_STORAGE_CLASS not found for object: " << obj->get_key() << dendl;
457460
}
458461
ret = driver->get_zone()->get_zonegroup().get_placement_tier(target_placement, &tier);
459462

460463
if (ret < 0) {
461-
ldpp_dout(this, -1) << __PRETTY_FUNCTION__ << ": ERROR: failed to fetch tier placement handle, ret = " << ret << dendl;
464+
ldpp_dout(this, -1) << __PRETTY_FUNCTION__ << ": ERROR: failed to fetch tier placement handle, target_placement = " << target_placement << ", for zonegroup = " << driver->get_zone()->get_zonegroup().get_name() << ", ret = " << ret << dendl;
462465
goto done;
463466
} else {
464467
ldpp_dout(this, 20) << __PRETTY_FUNCTION__ << ": getting tier placement handle"

0 commit comments

Comments
 (0)