Project

General

Profile

Actions

Bug #56969

closed

has_bluestore_label() throws an error when the device_path is a path

Added by Guillaume Abrioux over 1 year ago. Updated over 1 year ago.

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

0%

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

Description

When we instantiate the Device class with a path instead of a block device, it throws an error like following

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.6/site-packages/ceph_volume/util/device.py", line 130, in __init__
    self._parse()
  File "/usr/lib/python3.6/site-packages/ceph_volume/util/device.py", line 233, in _parse
    self.ceph_device = disk.has_bluestore_label(self.path)
  File "/usr/lib/python3.6/site-packages/ceph_volume/util/disk.py", line 906, in has_bluestore_label
    with open(device_path, "rb") as fd:
IsADirectoryError: [Errno 21] Is a directory: '/var/lib/ceph/osd/ceph-0/'

Passing a path instead of a block device is valid, `simple scan` needs it.


Related issues 2 (0 open2 closed)

Copied to ceph-volume - Backport #56981: quincy: has_bluestore_label() throws an error when the device_path is a pathResolvedAdam KingActions
Copied to ceph-volume - Backport #56982: pacific: has_bluestore_label() throws an error when the device_path is a pathResolvedAdam KingActions
Actions #1

Updated by Guillaume Abrioux over 1 year ago

  • Pull request ID set to 47361
Actions #2

Updated by Adam King over 1 year ago

  • Status changed from In Progress to Pending Backport
Actions #3

Updated by Backport Bot over 1 year ago

  • Copied to Backport #56981: quincy: has_bluestore_label() throws an error when the device_path is a path added
Actions #4

Updated by Backport Bot over 1 year ago

  • Copied to Backport #56982: pacific: has_bluestore_label() throws an error when the device_path is a path added
Actions #5

Updated by Backport Bot over 1 year ago

  • Tags set to backport_processed
Actions #6

Updated by Guillaume Abrioux over 1 year ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF