]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: need to close_section in lc list op 12232/head
authorweiqiaomiao <wei.qiaomiao@zte.com.cn>
Thu, 28 Jul 2016 11:45:15 +0000 (19:45 +0800)
committerSage Weil <sage@redhat.com>
Wed, 30 Nov 2016 02:58:21 +0000 (21:58 -0500)
Signed-off-by: weiqiaomiao <wei.qiaomiao@zte.com.cn>
src/rgw/rgw_admin.cc

index be66db398b065ac373f33fc7d65e348a691c9e8c..e7eb0bc5399ea2990495cffaf3e53e998ad57c66 100644 (file)
@@ -5209,10 +5209,13 @@ next:
   }
 
   if (opt_cmd == OPT_LC_LIST) {
-    formatter->open_array_section("life cycle progress");
+    formatter->open_array_section("lifecycle_list");
     map<string, int> bucket_lc_map;
     string marker;
 #define MAX_LC_LIST_ENTRIES 100
+    if (max_entries < 0) {
+      max_entries = MAX_LC_LIST_ENTRIES;
+    }
     do {
       int ret = store->list_lc_progress(marker, max_entries, &bucket_lc_map);
       if (ret < 0) {
@@ -5230,6 +5233,9 @@ next:
         marker = iter->first;
       }
     } while (!bucket_lc_map.empty());
+
+    formatter->close_section(); //lifecycle list
+    formatter->flush(cout);
   }