]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw/restore: Fixing teuthology restore tests
authorSoumya Koduri <skoduri@redhat.com>
Thu, 18 Sep 2025 11:38:48 +0000 (17:08 +0530)
committerSoumya Koduri <skoduri@redhat.com>
Mon, 22 Sep 2025 18:12:51 +0000 (23:42 +0530)
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 <skoduri@redhat.com>
qa/suites/rgw/cloud-transition/overrides.yaml
qa/suites/rgw/cloud-transition/tasks/restore/cloud_restore_s3tests.yaml
qa/suites/rgw/cloud-transition/tasks/transition/cloud_transition_s3tests.yaml
qa/tasks/rgw_cloudtier.py
src/rgw/rgw_restore.cc

index 1e25002ad79caa5e198af6e70ea0335f840a8507..b42e092d7967d3188417c6fa35f5aff6a0dfebaf 100644 (file)
@@ -5,6 +5,7 @@ overrides:
         setuser: ceph
         setgroup: ceph
         debug rgw: 20
+        debug rgw_restore: 20
         rgw crypt s3 kms backend: testing
         rgw crypt s3 kms encryption keys: testkey-1=YmluCmJvb3N0CmJvb3N0LWJ1aWxkCmNlcGguY29uZgo= testkey-2=aWIKTWFrZWZpbGUKbWFuCm91dApzcmMKVGVzdGluZwo=
         rgw crypt require ssl: false
index 7517720c9924b1638792ceafa29bd689d515d9d8..e3da7940734ac655783c3da7b4273fa1adb8c73f 100644 (file)
@@ -7,6 +7,7 @@ tasks:
     client.1:
       port: 8001
 - rgw-cloudtier:
+    client.1:
     client.0:
       cloud_storage_class: CLOUDTIER-CLIENT0
       cloud_client: client.1
index 1a6c0a74f2dbe4403495385ea7874c9169c4ce1a..d1ed911b1fbd4b67504a30cb281f8f3a1d6fe716 100644 (file)
@@ -11,6 +11,7 @@ tasks:
     #client.3:
       #port: 8003
 - rgw-cloudtier:
+    client.1:
     client.0:
       # cloudtier storage class params
       # retain_head_object = false
index dabcbd9528fde56f075abe2bf40f7ae6417752ee..2bbc12f90b5d81c6c4cd6b698c7630c33ba595f9 100644 (file)
@@ -54,8 +54,6 @@ class RGWCloudTier(Task):
         clients = self.config.keys() # http://tracker.ceph.com/issues/20417
         for client in clients:
             client_config = self.config.get(client)
-            if client_config is None:
-                client_config = {}
 
             if client_config is not None:
                 log.info('client %s - cloudtier config is -----------------%s ', client, client_config)
@@ -118,13 +116,14 @@ class RGWCloudTier(Task):
 
                 log.info('Finished Configuring rgw cloudtier ...')
                 
-                cluster_name, daemon_type, client_id = teuthology.split_role(client)
-                client_with_id = daemon_type + '.' + client_id
-                self.ctx.daemons.get_daemon('rgw', client_with_id, cluster_name).restart()
-                log.info('restarted rgw daemon ...')
+        for client in clients:
+            cluster_name, daemon_type, client_id = teuthology.split_role(client)
+            client_with_id = daemon_type + '.' + client_id
+            self.ctx.daemons.get_daemon('rgw', client_with_id, cluster_name).restart()
+            log.info('restarted rgw daemon ...')
 
-                (remote,) = self.ctx.cluster.only(client).remotes.keys()
-                wait_for_radosgw(endpoint.url(), remote)
+            (remote,) = self.ctx.cluster.only(client).remotes.keys()
+            wait_for_radosgw(endpoint.url(), remote)
                 
 
 task = RGWCloudTier
index 78120eba01b6463be32118eef1a50f126b6f82b4..8609132bf21787e7bee131253057cd675f3cc4dd 100644 (file)
@@ -432,6 +432,7 @@ int Restore::process_restore_entry(RestoreEntry& entry, optional_yield y)
     return ret;
   }
 
+  ldpp_dout(this, 10) << "Restore:: Processing restore entry of object(" << obj->get_key() << ") entry: " << entry << dendl;
   target_placement.inherit_from(bucket->get_placement_rule());
 
   auto& attrs = obj->get_attrs();
@@ -454,11 +455,13 @@ int Restore::process_restore_entry(RestoreEntry& entry, optional_yield y)
   attr_iter = attrs.find(RGW_ATTR_STORAGE_CLASS);
   if (attr_iter != attrs.end()) {
     target_placement.storage_class = attr_iter->second.to_str();
+  } else {
+    ldpp_dout(this, -1) << __PRETTY_FUNCTION__ << ": ERROR: Attr RGW_ATTR_STORAGE_CLASS not found for object: " << obj->get_key() << dendl;
   }
   ret = driver->get_zone()->get_zonegroup().get_placement_tier(target_placement, &tier);
 
   if (ret < 0) {
-    ldpp_dout(this, -1) << __PRETTY_FUNCTION__ << ": ERROR: failed to fetch tier placement handle, ret = " << ret << dendl;
+    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;
     goto done;   
   } else {
     ldpp_dout(this, 20) << __PRETTY_FUNCTION__ << ": getting tier placement handle"