Project

General

Profile

Bug #44246

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

Added by Yehuda Sadeh 10 months ago. Updated 9 months 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:

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

Copied to ceph-volume - Bug #44285: ceph-volum lvm create_lv is called without a vg name Closed
Copied to ceph-volume - Backport #44325: nautilus: ceph-volum lvm get_device_vgs() doesn't filter by prefix Resolved
Copied to ceph-volume - Backport #44326: mimic: ceph-volum lvm get_device_vgs() doesn't filter by prefix Resolved

History

#1 Updated by Jan Fajerski 9 months 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.

#2 Updated by Sebastian Wagner 9 months ago

  • Pull request ID set to 33478

#3 Updated by Jan Fajerski 9 months ago

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

#4 Updated by Jan Fajerski 9 months ago

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

#5 Updated by Jan Fajerski 9 months ago

  • Status changed from Fix Under Review to Pending Backport

#6 Updated by Nathan Cutler 9 months ago

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

#7 Updated by Nathan Cutler 9 months ago

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

#8 Updated by Jan Fajerski 9 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF