Project

General

Profile

Bug #19226

ceph-disk: cannot deactivate a directory-based osd

Added by Dan van der Ster about 7 years ago. Updated over 6 years ago.

Status:
Won't Fix
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

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

Description

Hi,
We cannot deactivate a path-based OSD.

Creating the OSD:

# mkdir -p /data/a
# chown ceph:ceph /data/a
# ceph-disk prepare /data/a
# ceph-disk activate /data/a
got monmap epoch 30
added key for osd.104
Created symlink from /run/systemd/system/ceph-osd.target.wants/ceph-osd@104.service to /usr/lib/systemd/system/ceph-osd@.service.

Now the OSD is running:

# ps -ef | grep 104
ceph       16444       1  2 14:27 ?        00:00:16 /usr/bin/ceph-osd -f --cluster ceph --id 104 --setuser ceph --setgroup ceph

Now trying to deactivate it (also tried deactivating by ID):

# ceph-disk deactivate /data/a
ceph-disk: Error: Cannot find any match device!!
# ceph-disk deactivate --deactivate-by-id 104
ceph-disk: Error: Cannot find any match device!!

Here is the verbose mode:

# ceph-disk --verbose deactivate /data/a
get_dm_uuid: get_dm_uuid /dev/vda uuid path is /sys/dev/block/253:0/dm/uuid
command: Running command: /usr/sbin/blkid -o udev -p /dev/vda1
command: Running command: /usr/sbin/blkid -o udev -p /dev/vda1
list_devices: main_list: /dev/vda1 ptype = 0x83 uuid = None
list_devices: main_list: {'vda': ['vda1']}, uuid_map = {}, space_map = {}
get_dm_uuid: get_dm_uuid /dev/vda1 uuid path is /sys/dev/block/253:1/dm/uuid
command: Running command: /usr/sbin/blkid -o udev -p /dev/vda1
command: Running command: /usr/sbin/blkid -o udev -p /dev/vda1
list_dev: list_dev(dev = /dev/vda1, ptype = 0x83)
command: Running command: /usr/sbin/blkid -s TYPE /dev/vda1
list_devices: list_devices: [{'path': '/dev/vda', 'partitions': [{'dmcrypt': {}, 'uuid': None, 'mount': u'/', 'ptype': u'0x83', 'is_partition': True, 'fs_type': u'xfs', 'path': '/dev/vda1', 'type': 'other'}]}]
Traceback (most recent call last):
  File "/usr/sbin/ceph-disk", line 9, in <module>
    load_entry_point('ceph-disk==1.0.0', 'console_scripts', 'ceph-disk')()
  File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 5047, in run
    main(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 4998, in main
    args.func(args)
  File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 3491, in main_deactivate
    main_deactivate_locked(args)
  File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 3514, in main_deactivate_locked
    raise Error('Cannot find any match device!!')
ceph_disk.main.Error: Error: Cannot find any match device!!

History

#1 Updated by Loïc Dachary over 6 years ago

  • Status changed from New to Won't Fix

deactivate was designed to work with devices indeed. It has evolved with luminous but I still think it won't work well there. Since ceph-disk is going to be deprecated in favor of ceph-volume and that fixing this would require non trivial changes, I'm inclined to not try to implement a fix. If you disagree, feel free to comment and I'll re-open.

Also available in: Atom PDF