Skip to content
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: newly created osd should not be wrongly marked in #11795

Merged
merged 1 commit into from Nov 10, 2016

Conversation

runsisi
Copy link
Contributor

@runsisi runsisi commented Nov 5, 2016

if we are creating an osd which has the same id as a previously removed in osd, we should not mark this newly created osd as in, otherwise it would be confusing for user who has set the noin flag and then tries to create new osds

steps to reproduce:

[root@c49 ~]# ceph osd tree  
ID WEIGHT  TYPE NAME     UP/DOWN REWEIGHT PRIMARY-AFFINITY 
-1 0.25400 root default                                    
-2 0.25400     host c49                                    
 0 0.12700         osd.0      up  1.00000          1.00000 
 1 0.12700         osd.1      up  1.00000          1.00000 
 2       0 osd.2            down  1.00000          1.00000 
 3       0 osd.3            down        0          1.00000 
 4       0 osd.4            down        0          1.00000 
[root@c49 ~]# 
[root@c49 ~]# ceph osd in 4
marked in osd.4. 
[root@c49 ~]# ceph osd rm 4
removed osd.4
[root@c49 ~]# ceph osd create
4
[root@c49 ~]# ceph osd tree
ID WEIGHT  TYPE NAME     UP/DOWN REWEIGHT PRIMARY-AFFINITY 
-1 0.25400 root default                                    
-2 0.25400     host c49                                    
 0 0.12700         osd.0      up  1.00000          1.00000 
 1 0.12700         osd.1      up  1.00000          1.00000 
 2       0 osd.2            down  1.00000          1.00000 
 3       0 osd.3            down        0          1.00000 
 4       0 osd.4            down  1.00000          1.00000

Signed-off-by: runsisi runsisi@zte.com.cn

if we are creating an osd which has the same id as a previously
removed 'in' osd, we should not mark this newly created osd as 'in'

Signed-off-by: runsisi <runsisi@zte.com.cn>
@liewegas
Copy link
Member

liewegas commented Nov 5, 2016

lgtm

@liewegas liewegas added this to the kraken milestone Nov 5, 2016
@tchaikov tchaikov merged commit 0e9462b into ceph:master Nov 10, 2016
@runsisi runsisi deleted the wip-fix-osd-noin branch November 10, 2016 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants