Project

General

Profile

Bug #43400

c-v inventory returns available on ceph LVs

Added by S├ębastien Han 8 months ago. Updated 5 months ago.

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

0%

Source:
Tags:
Backport:
nautilus, mimic
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

Description

c-v

The problem is that the device is held by LVM so the filter "locked" succeeds, see:

[root@rook-ceph-osd-prepare-minikube-x7qq4 /]# ceph-volume inventory /dev/vdc --format json
 stderr: unable to read label for /dev/vdc: (2) No such file or directory
{"available": false, "lvs": [{"cluster_name": "ceph", "name": "osd-block-e556a1ca-def9-4ab5-8b6e-45beb5b10df5", "osd_id": "1", "cluster_fsid": "c539743c-f384-4301-90f9-907ea2aae820", "type": "block", "block_uuid": "hJG6Ne-diYs-tH7V-6RKf-C9JU-1ckb-pP3dlu", "osd_fsid": "e556a1ca-def9-4ab5-8b6e-45beb5b10df5"}], "rejected_reasons": ["locked"], "sys_api": {"size": 32212254720.0, "scheduler_mode": "mq-deadline", "rotational": "1", "vendor": "0x1af4", "human_readable_size": "30.00 GB", "sectors": 0, "sas_device_handle": "", "rev": "", "sas_address": "", "locked": 1, "sectorsize": "512", "removable": "0", "path": "/dev/vdc", "support_discard": "0", "model": "", "ro": "0", "nr_requests": "256", "partitions": {}}, "path": "/dev/vdc", "device_id": ""}

IMHO this is the wrong reason or at least reasons should have precedence which doesn't seem to be the case since after de-activating the VG, the device appears to be available:

[root@rook-ceph-osd-prepare-minikube-x7qq4 /]# vgs
  Udev is running and DM_DISABLE_UDEV environment variable is set. Bypassing udev, LVM will manage logical volume symlinks in device directory.
  Udev is running and DM_DISABLE_UDEV environment variable is set. Bypassing udev, LVM will obtain device list by scanning device directory.
  VG                                        #PV #LV #SN Attr   VSize  VFree
  ceph-8c4d481f-64ad-4970-a041-6c023f4bcd0c   1   1   0 wz--n- 29.00g    0 
[root@rook-ceph-osd-prepare-minikube-x7qq4 /]# vgchange -an ceph-8c4d481f-64ad-4970-a041-6c023f4bcd0c
  Udev is running and DM_DISABLE_UDEV environment variable is set. Bypassing udev, LVM will manage logical volume symlinks in device directory.
  Udev is running and DM_DISABLE_UDEV environment variable is set. Bypassing udev, LVM will obtain device list by scanning device directory.
  Udev is running and DM_DISABLE_UDEV environment variable is set. Bypassing udev, device-mapper library will manage device nodes in device directory.
  0 logical volume(s) in volume group "ceph-8c4d481f-64ad-4970-a041-6c023f4bcd0c" now active
[root@rook-ceph-osd-prepare-minikube-x7qq4 /]# ceph-volume inventory /dev/vdc --format json
 stderr: unable to read label for /dev/vdc: (2) No such file or directory
{"available": true, "lvs": [{"cluster_name": "ceph", "name": "osd-block-e556a1ca-def9-4ab5-8b6e-45beb5b10df5", "osd_id": "1", "cluster_fsid": "c539743c-f384-4301-90f9-907ea2aae820", "type": "block", "block_uuid": "hJG6Ne-diYs-tH7V-6RKf-C9JU-1ckb-pP3dlu", "osd_fsid": "e556a1ca-def9-4ab5-8b6e-45beb5b10df5"}], "rejected_reasons": [], "sys_api": {"size": 32212254720.0, "scheduler_mode": "mq-deadline", "rotational": "1", "vendor": "0x1af4", "human_readable_size": "30.00 GB", "sectors": 0, "sas_device_handle": "", "rev": "", "sas_address": "", "locked": 0, "sectorsize": "512", "removable": "0", "path": "/dev/vdc", "support_discard": "0", "model": "", "ro": "0", "nr_requests": "256", "partitions": {}}, "path": "/dev/vdc", "device_id": ""}

So in the last test, it should still return False.


Related issues

Copied to ceph-volume - Backport #44035: nautilus: c-v inventory returns available on ceph LVs Resolved
Copied to ceph-volume - Backport #44036: mimic: c-v inventory returns available on ceph LVs Resolved

History

#1 Updated by Jan Fajerski 8 months ago

Right, I think this is a result of https://tracker.ceph.com/issues/37650.

Though I suppose we should just get an lvm report anyway.

#2 Updated by Jan Fajerski 7 months ago

  • Status changed from New to Fix Under Review
  • Backport set to nautilus, mimic
  • Pull request ID set to 32527
  • Affected Versions v0.80.12 added

#3 Updated by Jan Fajerski 7 months ago

  • Affected Versions deleted (v0.80.12)

#4 Updated by Jan Fajerski 6 months ago

  • Status changed from Fix Under Review to Pending Backport
  • Pull request ID changed from 32527 to 32634

#5 Updated by Nathan Cutler 6 months ago

  • Copied to Backport #44035: nautilus: c-v inventory returns available on ceph LVs added

#6 Updated by Nathan Cutler 6 months ago

  • Copied to Backport #44036: mimic: c-v inventory returns available on ceph LVs added

#7 Updated by Nathan Cutler 5 months ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Also available in: Atom PDF