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: a few more upmap (and other) fixes #16239

Merged
merged 8 commits into from Jul 11, 2017

Conversation

Projects
None yet
4 participants
@xiexingguo
Member

xiexingguo commented Jul 10, 2017

No description provided.

xiexingguo added some commits Jul 8, 2017

crush: fix potential weight overflow
E.g.:
./bin/ceph osd crush reweight osd.0 32768

ID WEIGHT      TYPE NAME                                            UP/DOWN REWEIGHT PRIMARY-AFFINITY
-4 32770.00000 root default~hdd
-3           -     host gitbuilder-ceph-rpm-centos7-amd64-basic~hdd
 0           -         osd.0                                             up  1.00000          1.00000
 1     1.00000         osd.1                                             up  1.00000          1.00000
 2     1.00000         osd.2                                             up  1.00000          1.00000
-1 32770.00000 root default
-2           -     host gitbuilder-ceph-rpm-centos7-amd64-basic
 0           -         osd.0                                             up  1.00000          1.00000
 1     1.00000         osd.1                                             up  1.00000          1.00000
 2     1.00000         osd.2                                             up  1.00000          1.00000

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
mon/OSDMonitor: improve "osd upmap" error message
by adding a explicit guide.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
osd/OSDMap: apply both pg_upmap and pg_upmap_items
This allows a more flexible upmap policy by combinating
both pg_upmap and pg_upmap_items.

For example:
./bin/ceph osd pg-upmap 1.0 1 2 3
set 1.0 pg_upmap mapping to [1,2,3]

./bin/ceph osd pg-upmap-items 1.0 1 5
set 1.0 pg_upmap_items mapping to [1->5]

 ./bin/ceph pg ls-by-pool cephfs_data_a
PG_STAT OBJECTS MISSING_ON_PRIMARY DEGRADED MISPLACED UNFOUND BYTES LOG DISK_LOG STATE        STATE_STAMP                VERSION REPORTED UP      UP_PRIMARY ACTING  ACTING_PRIMARY
1.0           0                  0        0         0       0     0   0        0 active+clean 2017-07-10 11:04:53.955681     0'0    22:13 [5,2,3]          5 [5,2,3]              5

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
mon/OSDMonitor: guard "osd crush rule create-replicated"
require Luminous before using the crush device classes.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
@@ -3789,6 +3789,10 @@ int OSDMap::calc_pg_upmaps(
<< " pgs " << pgs << dendl;
}
if (osd_weight_total == 0) {
lderr(cct) << __func__ << "abort due to osd_weight_total == 0" << dendl;

This comment has been minimized.

@tchaikov

tchaikov Jul 10, 2017

Contributor

a space before "abort"

@tchaikov tchaikov added the mon label Jul 10, 2017

@xiexingguo xiexingguo requested a review from liewegas Jul 10, 2017

@liewegas

Looks good! Note the small changes to upmap semantics, @idryomov

@liewegas liewegas added the needs-qa label Jul 10, 2017

@idryomov

This comment has been minimized.

Contributor

idryomov commented Jul 10, 2017

@liewegas Queued it up, thanks!

@liewegas liewegas added this to the luminous milestone Jul 10, 2017

xiexingguo added some commits Jul 10, 2017

mon/OSDMonitor: sanity check osd number before applying pg-temp
In case user did something stupid and causing weird results.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
mon/OSDMonitor: allow user to permanently delete pool
If mon_fake_pool_delete is enabled, "osd pool delete"
will unable to delete pool permanently, as we ask user
to pass in a "--yes-i-really-really-mean-it-no-faking"
string now.

The old "osd pool delete" command won't allow user to do this.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
osd/OSDMap: fix potential divided-by-zero error
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
mon/OSDMonitor: dedup pg-upmap[-items]
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
ceph osd pool set rbd size 2
ceph osd pg-temp 1.0 0 1
ceph osd pg-temp 1.0 osd.1 osd.0
expect_false ceph osd pg-temp 1.0 0 1 2
@xiexingguo

This comment has been minimized.

Member

xiexingguo commented Jul 10, 2017

retest this please

@liewegas liewegas merged commit cb2cc82 into ceph:master Jul 11, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details

@xiexingguo xiexingguo deleted the xiexingguo:wip-crush-weight-overflow branch Jul 12, 2017

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