Bug #23124
closedStatus of OSDs are not showing properly after disabling ceph.target and ceph-osd.target
0%
Description
Execution Steps:
----------------
1. # ceph osd tree [ceph is in running state]
2. # systemctl disable ceph.target
3. # systemctl disable ceph-osd.target
4. # reboot
5. # ceph osd tree
6. # systemctl | grep ceph
7. # ps -ax | grep ceph
Observation:
-------------
It is observed that ceph osd tree is showing that OSDs are in "up" state , whereas osd daemon services are not running and no process is created for ceph-osd after disabling ceph.target and ceph-osd.target
Workaround:
------------
# systemctl start ceph-osd@<osd-id> # systemctl stop ceph-osd@<osd-id>[ Note : After starting the service again, osd tree gives proper output But this is not the proper solution ] # ceph osd tree
Files
Updated by Nathan Cutler about 6 years ago
The ceph.target and ceph-osd.target cannot be used this way. Assuming ceph-disk is being used, the OSDs are brought up by the udev rules, regardless of the enabled status of "ceph.target" and "ceph-osd.target". I believe you can disable individual OSD units, though, i.e. "systemctl disable ceph-osd@<id>.service" and possibly (depending on the version of systemd that is installed) even "systemctl disable ceph-osd@\*.service" to disable them all.
However, if you really want to be sure it's better to use ceph-disk directly. See "ceph-disk --help" for details, but these commands should get you started:
ceph-disk list --help ceph-disk deactivate --help ceph-disk activate --help
Updated by Josh Durgin about 6 years ago
- Status changed from New to Won't Fix
As Nathan explained, this isn't how the targets are meant to work.
Updated by Debashis Mondal about 6 years ago
As OSDs are brought up by the udev rules, regardless of the enabled status of "ceph.target" and "ceph-osd.target" hence by disabling ceph.target or ceph-osd.target the status of the OSD should not be shown up where the service regarding the OSD is already stopped and inactive.
So I think we need to look at this issue again