Actions
Bug #42597
openmon and mds ok-to-stop commands should validate input names exist to prevent misleading replies
Status:
Fix Under Review
Priority:
Normal
Assignee:
-
Category:
Administration/Usability
Target version:
-
% Done:
0%
Source:
Tags:
low-hanging-fruit
Backport:
quincy,reef
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
MDSMonitor
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
"ceph osd ok-to-stop" accepts only integers, "any", and "all". However, the "mon" and "mds" versions accept any string, regardless of whether it is a valid daemon name. They then say that everything will be fine:
root@dc-3558-422:~# ceph mon stat e1: 3 mons at {dc-3558-422=[v2:10.1.152.122:3300/0,v1:10.1.152.122:6789/0],m3-3101-422=[v2:10.1.155.122:3300/0,v1:10.1.155.122:6789/0],mc-3015-422=[v2:10.1.154.122:3300/0,v1:10.1.154.122:6789/0]}, election epoch 31318, leader 0 dc-3558-422, quorum 0,1,2 dc-3558-422,mc-3015-422,m3-3101-422 # Numeric id isn't recognized root@dc-3558-422:~# ceph mon ok-to-stop 0 quorum should be preserved (dc-3558-422,m3-3101-422,mc-3015-422) after stopping [0] # Missing a character root@dc-3558-422:~# ceph mon ok-to-stop dc-3558-42 quorum should be preserved (dc-3558-422,m3-3101-422,mc-3015-422) after stopping [dc-3558-42] # all? root@dc-3558-422:~# ceph mon ok-to-stop all quorum should be preserved (dc-3558-422,m3-3101-422,mc-3015-422) after stopping [all] # mds is the same: root@dc-3558-422:~# ceph mds ok-to-stop all should be safe to stop [all] root@dc-3558-422:~# ceph mds ok-to-stop 0 should be safe to stop [0]
The mon and mds ok-to-stop commands are therefore not very safe. "ceph mon ok-to-rm" does seem to validate mon names:
root@dc-3558-422:~# ceph mon ok-to-rm 0 mon.0 does not exist root@dc-3558-422:~# ceph mon ok-to-rm all mon.all does not exist root@dc-3558-422:~# ceph mon ok-to-rm foo mon.foo does not exist
Updated by Greg Farnum over 4 years ago
- Project changed from Ceph to RADOS
- Subject changed from mon and mds ok-to-stop commands do not validate inputs and produce misleading results to mon and mds ok-to-stop commands should validate input names exist to prevent misleading replies
- Category set to Administration/Usability
- Component(RADOS) Monitor added
Updated by Laura Flores almost 2 years ago
- Translation missing: en.field_tag_list set to low-hanging-fruit
Updated by Laura Flores 10 months ago
- Translation missing: en.field_tag_list changed from low-hanging-fruit to low-hanging-fruit, open-source-day
Updated by Suyash Dongre 5 months ago
- Pull request ID set to 54719
Created a PR for this issue: https://github.com/ceph/ceph/pull/54719
Updated by Radoslaw Zarzynski 5 months ago
- Status changed from New to Fix Under Review
Updated by Venky Shankar 5 months ago
- Project changed from RADOS to CephFS
- Category changed from Administration/Usability to Administration/Usability
- Backport set to quincy,reef
- Component(FS) MDSMonitor added
Actions