]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test: Consider a tier_promote case deleting redirect info
authormyoungwon oh <ohmyoungwon@gmail.com>
Sun, 9 Aug 2020 11:40:09 +0000 (20:40 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Tue, 18 Aug 2020 16:39:02 +0000 (01:39 +0900)
Since calling tier_promote triggers to remove redirect
manifest info in the target object, unset_manifest can get
the response with EOPNOTSUPP

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsumg.com>
src/test/osd/RadosModel.h

index f9ed443671516620f8eb26948155045f12a4c111..f71abc552a522bb60c04a9d0fee6e79053ef0d06 100644 (file)
@@ -2464,14 +2464,13 @@ public:
       /* unset redirect target */
       comp = context->rados.aio_create_completion();
       bool present = !src_value.deleted();
-      context->remove_object(oid);
-      op.remove();
+      op.unset_manifest();
       context->io_ctx.aio_operate(context->prefix+oid, comp, &op,
                                  librados::OPERATION_ORDER_READS_WRITES |
                                  librados::OPERATION_IGNORE_REDIRECT);
       comp->wait_for_complete();
       if ((r = comp->get_return_value())) {
-       if (!(r == -ENOENT && !present)) {
+       if (!(r == -ENOENT && !present) && r != -EOPNOTSUPP) {
          cerr << "r is " << r << " while deleting " << oid << " and present is " << present << std::endl;
          ceph_abort();
        }