]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/PGMap: add pg count for pools in the ceph df command 36944/head
authorVikhyat Umrao <vikhyat@redhat.com>
Wed, 26 Aug 2020 10:17:05 +0000 (03:17 -0700)
committerVikhyat Umrao <vikhyat@redhat.com>
Wed, 9 Sep 2020 11:36:48 +0000 (04:36 -0700)
Fixes: https://tracker.ceph.com/issues/46663
Signed-off-by: Vikhyat Umrao <vikhyat@redhat.com>
(cherry picked from commit 9ffbffbe6cd1d8dafb1dd88cbc1ce644afc7a915)

 Conflicts:
PendingReleaseNotes
        - Taking only release notes line for this commit

Signed-off-by: Vikhyat Umrao <vikhyat@redhat.com>
PendingReleaseNotes
src/mon/PGMap.cc

index 61af03c31fb0617806ed155267b467157adc961d..9d59a46d89a93da4b0c0a9a262e36573f94ccc2f 100644 (file)
@@ -1,17 +1,7 @@
->= 14.2.11
+>= 14.2.12
 ----------
 
-* RGW: The ``radosgw-admin`` sub-commands dealing with orphans --
-  ``radosgw-admin orphans find``, ``radosgw-admin orphans finish``,
-  ``radosgw-admin orphans list-jobs`` -- have been deprecated. They
-  have not been actively maintained and they store intermediate
-  results on the cluster, which could fill a nearly-full cluster.
-  They have been replaced by a tool, currently considered
-  experimental, ``rgw-orphan-list``.
-
-* Now when noscrub and/or nodeep-scrub flags are set globally or per pool,
-  scheduled scrubs of the type disabled will be aborted. All user initiated
-  scrubs are NOT interrupted.
+* The ``ceph df`` command now lists the number of pgs in each pool.
 
 * Monitors now have a config option ``mon_osd_warn_num_repaired``, 10 by default.
   If any OSD has repaired more than this many I/O errors in stored data a
index b51f740894dd9a3d02d1f6a058a1b59696e12dd7..ce6abdf537c5841e7a8c272f094d8a36f8277591 100644 (file)
@@ -759,6 +759,7 @@ void PGMapDigest::dump_pool_stats_full(
   } else {
     tbl.define_column("POOL", TextTable::LEFT, TextTable::LEFT);
     tbl.define_column("ID", TextTable::LEFT, TextTable::RIGHT);
+    tbl.define_column("PGS", TextTable::LEFT, TextTable::RIGHT);
     tbl.define_column("STORED", TextTable::LEFT, TextTable::RIGHT);
     tbl.define_column("OBJECTS", TextTable::LEFT, TextTable::RIGHT);
     tbl.define_column("USED", TextTable::LEFT, TextTable::RIGHT);
@@ -782,6 +783,7 @@ void PGMapDigest::dump_pool_stats_full(
       continue;
 
     const string& pool_name = osd_map.get_pool_name(pool_id);
+    auto pool_pg_num = osd_map.get_pg_num(pool_id);
     const pool_stat_t &stat = pg_pool_sum.at(pool_id);
 
     const pg_pool_t *pool = osd_map.get_pg_pool(pool_id);
@@ -805,7 +807,8 @@ void PGMapDigest::dump_pool_stats_full(
       f->open_object_section("stats");
     } else {
       tbl << pool_name
-          << pool_id;
+          << pool_id
+          << pool_pg_num;
     }
     float raw_used_rate = osd_map.pool_raw_used_rate(pool_id);
     bool per_pool = use_per_pool_stats();