Project

General

Profile

Actions

Bug #24044

closed

ceph-volume - LVM prepare - Failure handling of arbitrary --osd-id values

Added by Ron Allred almost 6 years ago. Updated almost 6 years ago.

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

0%

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

Description

The ceph-volume utility, is not properly handling arbitrary --osd-id values. Due to improper boolean handling of check_id return value in util/prepare.py

Below is a sample output for creation of --osd-id 30:

# ceph-volume lvm prepare --bluestore --osd-id 30 --data /dev/sdb2 --block.wal /dev/sdb1 --crush-device-class ssd
Running command: ceph-authtool --gen-print-key
Running command: ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring osd tree -f json
Running command: ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring -i - osd new 06a52ff0-8a2b-4b7b-941c-b3a3762f386a
Running command: vgcreate --force --yes ceph-8569d0e2-167b-47ee-8824-34e441044ba7 /dev/sdb2
 stdout: Physical volume "/dev/sdb2" successfully created
 stdout: Volume group "ceph-8569d0e2-167b-47ee-8824-34e441044ba7" successfully created
Running command: lvcreate --yes -l 100%FREE -n osd-block-06a52ff0-8a2b-4b7b-941c-b3a3762f386a ceph-8569d0e2-167b-47ee-8824-34e441044ba7
 stdout: Logical volume "osd-block-06a52ff0-8a2b-4b7b-941c-b3a3762f386a" created.
Running command: ceph-authtool --gen-print-key
Running command: mount -t tmpfs tmpfs /var/lib/ceph/osd/ceph-1
Running command: chown -R ceph:ceph /dev/dm-0
Running command: ln -s /dev/ceph-8569d0e2-167b-47ee-8824-34e441044ba7/osd-block-06a52ff0-8a2b-4b7b-941c-b3a3762f386a /var/lib/ceph/osd/ceph-1/block
Running command: ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring mon getmap -o /var/lib/ceph/osd/ceph-1/activate.monmap
 stderr: got monmap epoch 4
Running command: ceph-authtool /var/lib/ceph/osd/ceph-1/keyring --create-keyring --name osd.1 --add-key AQC65vBaBXvEHhAAdVBmfxPQWFQH2ORmwYRKMQ==
 stdout: creating /var/lib/ceph/osd/ceph-1/keyring
added entity osd.1 auth auth(auid = 18446744073709551615 key=AQC65vBaBXvEHhAAdVBmfxPQWFQH2ORmwYRKMQ== with 0 caps)
Running command: chown -R ceph:ceph /var/lib/ceph/osd/ceph-1/keyring
Running command: chown -R ceph:ceph /var/lib/ceph/osd/ceph-1/
Running command: chown -R ceph:ceph /dev/sdb1
Running command: ceph-osd --cluster ceph --osd-objectstore bluestore --mkfs -i 1 --monmap /var/lib/ceph/osd/ceph-1/activate.monmap --keyfile - --bluestore-block-wal-path /dev/sdb1 --osd-data /var/lib/ceph/osd/ceph-1/ --osd-uuid 06a52ff0-8a2b-4b7b-941c-b3a3762f386a --setuser ceph --setgroup ceph
--> ceph-volume lvm prepare successful for: /dev/sdb2

Fix is known / Patch & pull detail to follow

Actions #2

Updated by Alfredo Deza almost 6 years ago

  • Project changed from Ceph to ceph-volume
Actions #3

Updated by Ron Allred almost 6 years ago

I have submitted a new PR #22220.

Thanks Alfredo!

Actions #4

Updated by Alfredo Deza almost 6 years ago

  • Status changed from New to In Progress
Actions #6

Updated by Andrew Schoen almost 6 years ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF