Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quincy: ceph-volume: fix simple scan #47378

Closed
wants to merge 1 commit into from

Conversation

adk3798
Copy link
Contributor

@adk3798 adk3798 commented Jul 31, 2022

backport tracker: https://tracker.ceph.com/issues/56981


backport of #47361
parent tracker: https://tracker.ceph.com/issues/56969

this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh

When the class `Device` is instantiated with a path instead of a
block device, it fails 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.

Fixes: https://tracker.ceph.com/issues/56969

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
(cherry picked from commit 5a10e3e)

Conflicts:
	src/ceph-volume/ceph_volume/tests/util/test_disk.py
@adk3798 adk3798 requested a review from a team as a code owner July 31, 2022 18:43
@adk3798 adk3798 added this to the quincy milestone Jul 31, 2022
@adk3798
Copy link
Contributor Author

adk3798 commented Jul 31, 2022

@guits same as pacific backport, minor merge conflict in the tests

image

@guits
Copy link
Contributor

guits commented Aug 1, 2022

jenkins test ceph-volume tox

@guits
Copy link
Contributor

guits commented Aug 2, 2022

closing this one in favor of #47406

@guits guits closed this Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants