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/OSDMonitor: a couple of upmap and other fixes #15917

Merged
merged 11 commits into from Jun 27, 2017

Conversation

Projects
None yet
2 participants
@xiexingguo
Member

xiexingguo commented Jun 26, 2017

No description provided.

xiexingguo added some commits Jun 24, 2017

osd/OSDMap: make apply_upmap handle multiple pg-upmap-items correctly
Was:
PG_STAT  UP      UP_PRIMARY ACTING  ACTING_PRIMARY
0.7      [1,0,4]          1 [1,0,4]              1

~#:./bin/ceph osd pg-upmap-items 0.7 0 2 1 3 4 5
set 0.7 pg_upmap_items mapping to [0,2,1,3,4,5]

PG_STAT  UP      UP_PRIMARY ACTING  ACTING_PRIMARY
0.7      [1,2,4]          1 [1,2,4]              1

Now:
PG_STAT  UP      UP_PRIMARY ACTING  ACTING_PRIMARY
0.7      [1,0,4]          1 [1,0,4]              1

~#:./bin/ceph osd pg-upmap-items 0.7 0 2 1 3 4 5
set 0.7 pg_upmap_items mapping to [0,2,1,3,4,5]

PG_STAT  UP      UP_PRIMARY ACTING  ACTING_PRIMARY
0.7      [3,2,5]          3 [3,2,5]              3

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
mon/OSDMonitor: reject updating upmap if number of osd overflows/unde…
…rflows

This can avoid, e.g.:

~#:./bin/ceph osd pg-upmap 0.7 1 2 3 4
set 0.7 pg_upmap mapping to [1,2,3,4]

~#:./bin/ceph pg dump
PG_STAT OBJECTS MISSING_ON_PRIMARY DEGRADED MISPLACED UNFOUND BYTES LOG DISK_LOG STATE        STATE_STAMP                VERSION REPORTED UP        UP_PRIMARY ACTING    ACTING_PRIMARY LAST_SCRUB SCRUB_STAMP                LAST_DEEP_SCRUB DEEP_SCRUB_STAMP
0.7           0                  0        0         0       0     0   0        0      peering 2017-06-24 10:11:03.938102     0'0    53:18 [1,2,3,4]          1 [1,2,3,4]              1        0'0 2017-06-24 09:38:50.162197             0'0 2017-06-24 09:38:50.162197

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
mon/OSDMonitor: make pg-up-items result a bit nicer
~#: ./bin/ceph osd pg-upmap-items 0.7 0 2 1 3 4 5
set 0.7 pg_upmap_items mapping to [0->2,1->3,4->5]

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
mon/OSDMonitor: kill dead code
This option is now filtered out automatically, so these codes are unaccessable.

./bin/ceph osd unset sortbitwise
Invalid command:  sortbitwise not in full|pause|noup|nodown|noout|noin|nobackfill|norebalance|norecover|noscrub|nodeep-scrub|notieragent
osd unset full|pause|noup|nodown|noout|noin|nobackfill|norebalance|norecover|noscrub|nodeep-scrub|notieragent :  unset <key>
Error EINVAL: invalid command

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
osd/osd_type: map.find() -> map.count() for existense checking
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
mon/OSDMonitor: strict comparison condition
To match the specifications of straw_calc_version.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
mon/OSDMonitor: fix wrong comment, wrong indention, wrong output etc.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
mon/OSDMonitor: make blacklist expire configurable; fix potential races
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
mon/OSDMonitor: fix wrong sanity check order for allow_ec_overwrites
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
mon/OSDMonitor: drop debug_fake_ec_pool from "osd pool set" cmd filter
It is dead!

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
mon/OSDMonitor: add use_gmt_hitset to "osd pool get" cmd filter
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>

@xiexingguo xiexingguo requested a review from liewegas Jun 26, 2017

@liewegas

all good!

@liewegas liewegas merged commit f6087a3 into ceph:master Jun 27, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
default Build finished.
Details
make check make check succeeded
Details

@xiexingguo xiexingguo deleted the xiexingguo:wip-upmap-fixes branch Jun 27, 2017

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