Project

General

Profile

Actions

Bug #44246

closed

ceph-volum lvm get_device_vgs() doesn't filter by prefix

Added by Yehuda Sadeh about 4 years ago. Updated about 4 years ago.

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

0%

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

Description

get_device_vgs() is supposed to filter only volume groups that start with 'ceph', but code ignores the prefix, so vg used in create_lv() might be incorrect. See:

ceph: root@mira118 /]$ceph-volume lvm prepare  --bluestore --data /dev/sdg --no-systemd 
 stderr: unable to read label for /dev/sdg: (2) No such file or directory
Running command: /usr/bin/ceph-authtool --gen-print-key
Running command: /usr/bin/ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring -i - osd new b3e1e38a-8e93-4eb6-a464-18744da79597
Running command: /usr/sbin/lvcreate --yes -l 100%FREE -n osd-block-b3e1e38a-8e93-4eb6-a464-18744da79597 
 stderr: Volume group name  has invalid characters
  Run `lvcreate --help' for more information.
--> Was unable to complete a new OSD, will rollback changes
Running command: /usr/bin/ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring osd purge-new osd.1 --yes-i-really-mean-it
 stderr: purged osd.1
-->  RuntimeError: command returned non-zero exit status: 3


Related issues 3 (0 open3 closed)

Copied to ceph-volume - Bug #44285: ceph-volum lvm create_lv is called without a vg nameClosed

Actions
Copied to ceph-volume - Backport #44325: nautilus: ceph-volum lvm get_device_vgs() doesn't filter by prefixResolvedJan FajerskiActions
Copied to ceph-volume - Backport #44326: mimic: ceph-volum lvm get_device_vgs() doesn't filter by prefixResolvedJan FajerskiActions
Actions #1

Updated by Jan Fajerski about 4 years ago

Yes get_device_vgs() is indeed missing the filtering. Good catch :)

However I'm unable to reproduce this particular failure. Is there any specific environment for this? I tried the prepare call on a blank drive, as well as with an existing vg. Both times the command finishes successfully.

Actions #2

Updated by Sebastian Wagner about 4 years ago

  • Pull request ID set to 33478
Actions #3

Updated by Jan Fajerski about 4 years ago

  • Copied to Bug #44285: ceph-volum lvm create_lv is called without a vg name added
Actions #4

Updated by Jan Fajerski about 4 years ago

  • Status changed from New to Fix Under Review
  • Backport set to nautilus, mimic
Actions #5

Updated by Jan Fajerski about 4 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #6

Updated by Nathan Cutler about 4 years ago

  • Copied to Backport #44325: nautilus: ceph-volum lvm get_device_vgs() doesn't filter by prefix added
Actions #7

Updated by Nathan Cutler about 4 years ago

  • Copied to Backport #44326: mimic: ceph-volum lvm get_device_vgs() doesn't filter by prefix added
Actions #8

Updated by Jan Fajerski about 4 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF