Project

General

Profile

Actions

Bug #54122

closed

Validate monitor ID provided with ok-to-stop similar to ok-to-rm

Added by Nitzan Mordechai about 2 years ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Category:
Correctness/Safety
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

ceph mon ok-to-stop doesn't validate the monitor ID provided. Thus returns that "quorum should be preserved " without even actually checking.

This might induce inconvenience if a user provides an ID even with a single character typo, ok-to-stop would returns that "quorum should be preserved " even there might be possibility of actually not the case with actual mon

Version-Release number of selected component (if applicable):
ceph-mon-14.2.11-184.el8cp.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Configure a cluster check
2. sudo ceph mon ok-to-stop <arbitrary-id>

Actual results:
[cephuser@ceph-rgw2-vasishta-7mputd-node1-installer ~]$ sudo ceph mon ok-to-stop abcd
quorum should be preserved (ceph-rgw2-vasishta-7mputd-node1-installer,ceph-rgw2-vasishta-7mputd-node3,ceph-rgw2-vasishta-7mputd-node4) after stopping [abcd]

[cephuser@ceph-rgw2-vasishta-7mputd-node1-installer ~]$ sudo ceph mon stat
e1: 3 mons at {ceph-rgw2-vasishta-7mputd-node1-installer=.....
...
..
election epoch 30, leader 0 ceph-rgw2-vasishta-7mputd-node3, quorum 0,1,2 ceph-rgw2-vasishta-7mputd-node3,ceph-rgw2-vasishta-7mputd-node1-installer,ceph-rgw2-vasishta-7mputd-node4

Expected results:
'ceph mon ok-to-stop' should validate the user provided ip before proceeding further

Additional info:
It can be observed that ok-to-rm would actually validate the id before proceeding
[cephuser@ceph-rgw2-vasishta-7mputd-node1-installer ~]$ sudo ceph mon ok-to-rm abcd
mon.abcd does not exist

Actions #1

Updated by Nitzan Mordechai about 2 years ago

  • Status changed from New to Fix Under Review
Actions #2

Updated by Neha Ojha about 2 years ago

  • Pull request ID set to 44839
Actions #3

Updated by Nitzan Mordechai about 1 year ago

  • Status changed from Fix Under Review to Resolved

Merged

Actions

Also available in: Atom PDF