]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: fix result when user's topics is null
authorcao.leilc <cao.leilc@inspur.com>
Mon, 19 Dec 2022 02:31:05 +0000 (10:31 +0800)
committercao.leilc <cao.leilc@inspur.com>
Mon, 19 Dec 2022 02:31:05 +0000 (10:31 +0800)
Fixes: https://tracker.ceph.com/issues/53370
Signed-off-by: caolei <cao.leilc@inspur.com>
src/rgw/rgw_admin.cc

index f18ce8cfbfb78f9b4b25f3c04dcd8d77e9c9a729..dc9eeec9505a82772d0a6dc43d4601839e146738 100644 (file)
@@ -10430,7 +10430,7 @@ next:
 
       auto b = ps.get_bucket(bucket->get_key());
       ret = b->get_topics(&result);
-      if (ret < 0) {
+      if (ret < 0 && ret != -ENOENT) {
         cerr << "ERROR: could not get topics: " << cpp_strerror(-ret) << std::endl;
         return -ret;
       }
@@ -10438,7 +10438,7 @@ next:
     } else {
       rgw_pubsub_topics result;
       int ret = ps.get_topics(&result);
-      if (ret < 0) {
+      if (ret < 0 && ret != -ENOENT) {
         cerr << "ERROR: could not get topics: " << cpp_strerror(-ret) << std::endl;
         return -ret;
       }