Project

General

Profile

Actions

Bug #23001

open

ceph-volume should destroy vgs and lvs on OSD creation failure

Added by David Galloway about 6 years ago. Updated over 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

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

Description

root@reesi001:~# ceph-volume lvm prepare --bluestore --data /dev/sda --journal /dev/journals/lvol0
Running command: ceph-authtool --gen-print-key
Running command: ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring -i - osd new 43d2cd4c-af19-4e0f-bb2e-816cb4c5bcf4
Running command: vgcreate --force --yes ceph-28f7427e-5558-4ffd-ae1a-51ec3042759a /dev/sda
 stdout: Volume group "ceph-28f7427e-5558-4ffd-ae1a-51ec3042759a" successfully created
Running command: lvcreate --yes -l 100%FREE -n osd-block-43d2cd4c-af19-4e0f-bb2e-816cb4c5bcf4 ceph-28f7427e-5558-4ffd-ae1a-51ec3042759a
 stdout: Logical volume "osd-block-43d2cd4c-af19-4e0f-bb2e-816cb4c5bcf4" created.
Running command: ceph-authtool --gen-print-key
--> Was unable to complete a new OSD, will rollback changes
--> OSD will be fully purged from the cluster, because the ID was generated
Running command: ceph osd purge osd.95 --yes-i-really-mean-it
 stderr: purged osd.95
-->  RuntimeError: "ceph" user is not available in the current system

root@reesi001:~# lvdisplay /dev/ceph*
  --- Logical volume ---
  LV Path                /dev/ceph-28f7427e-5558-4ffd-ae1a-51ec3042759a/osd-block-43d2cd4c-af19-4e0f-bb2e-816cb4c5bcf4
  LV Name                osd-block-43d2cd4c-af19-4e0f-bb2e-816cb4c5bcf4
  VG Name                ceph-28f7427e-5558-4ffd-ae1a-51ec3042759a
  LV UUID                PWZkYb-odTe-mhOt-fCp9-1qvc-fL1n-dsfn5Y
  LV Write Access        read/write
  LV Creation host, time reesi001, 2018-02-14 11:21:36 -0500
  LV Status              available
  # open                 0
  LV Size                3.64 TiB
  Current LE             953861
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           252:12

If creating a new OSD and there's no data on the drive, wouldn't it make sense to remove the logical volume and volume group that was created so the device(s) can be reused?

Actions

Also available in: Atom PDF