New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mon: in output of "ceph osd df tree", display "-", not "0", for pg amount of a bucket #13015

Merged
merged 1 commit into from Feb 8, 2017

Conversation

Projects
None yet
3 participants
@chuanhong-wang
Contributor

chuanhong-wang commented Jan 20, 2017

It's not correct that the pg amount of a bucket, e.g. host, is 0. Therefor, dispaly "-" should be better, just lick the display of REWEIGHT.

Signed-off-by: Chuanhong Hong chuanhong.wang@163.com

@@ -644,7 +644,7 @@ class OSDUtilizationDumper : public CrushTreeDumper::Dumper<F> {
if (average_util)
var = util / average_util;
size_t num_pgs = pgm->get_num_pg_by_osd(qi.id);
size_t num_pgs = qi.is_bucket() ? 0 : pgm->get_num_pg_by_osd(qi.id);

This comment has been minimized.

@tchaikov

tchaikov Jan 20, 2017

Contributor

if the qi.id is not in pg_by_osd, pgm->get_num_pg_by_osd() returns 0 anyway. so this change does not change the behavior here, right?

This comment has been minimized.

@chuanhong-wang

chuanhong-wang Jan 20, 2017

Contributor

yes, pgm->get_num_pg_by_osd() always returns 0 if qi is a bucket. Therefor, it needn't to call it for a bucket.

@tchaikov

This comment has been minimized.

Contributor

tchaikov commented Jan 20, 2017

could you prefix the title of your commit message with the subcomponent your are changing ? see https://github.com/ceph/ceph/blob/master/SubmittingPatches.rst#3-describe-your-changes, in this case, it would be "mon: ".

@tchaikov tchaikov added the mon label Jan 20, 2017

@chuanhong-wang chuanhong-wang changed the title from In output of "ceph osd df tree", display "-", not "0", for pg amount of a bucket to mon: in output of "ceph osd df tree", display "-", not "0", for pg amount of a bucket Jan 20, 2017

mon: in output of "ceph osd df tree", display "-", not "0", for pg am…
…ount of a bucket

Signed-off-by: Chuanhong Hong  <chuanhong.wang@163.com>
@songbaisen

This comment has been minimized.

songbaisen commented Jan 20, 2017

@chuanhong-wang Hello. 😄 New life,new begin.

@chuanhong-wang

This comment has been minimized.

Contributor

chuanhong-wang commented Jan 21, 2017

@tchaikov title changed, please help me review again.

@tchaikov tchaikov added the needs-qa label Feb 3, 2017

@tchaikov tchaikov self-assigned this Feb 3, 2017

@tchaikov tchaikov merged commit 6be8ec5 into ceph:master Feb 8, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
@tchaikov

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment