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

ceph-volume: make disk.is_device follow symlinks #50938

Closed
wants to merge 1 commit into from

Conversation

priteau
Copy link
Contributor

@priteau priteau commented Apr 7, 2023

When calling ceph-volume on a symlink, the user intends to use the device which is the target of the symlink. Change disk.is_device() to use os.stat instead of os.lstat. This ensures we check whether the target of the symlink is a block device.

This fixes adding multipath devices which can be accessed via /dev/mapper/ but are symlinks to ../dm-.

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

When calling ceph-volume on a symlink, the user intends to use the
device which is the target of the symlink. Change disk.is_device() to
use os.stat instead of os.lstat. This ensures we check whether the
target of the symlink is a block device.

This fixes adding multipath devices which can be accessed via
/dev/mapper/<id> but are symlinks to ../dm-<num>.

Fixes: https://tracker.ceph.com/issues/59375
Signed-off-by: Pierre Riteau <pierre@stackhpc.com>
@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions bot added the stale label Oct 10, 2023
Copy link

github-actions bot commented Nov 9, 2023

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

@github-actions github-actions bot closed this Nov 9, 2023
@mnasiadka
Copy link
Contributor

@guits Should that be restored? I think it would be useful.

@guits guits removed the stale label Mar 6, 2024
@guits guits reopened this Mar 6, 2024
Copy link

github-actions bot commented Mar 6, 2024

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@priteau
Copy link
Contributor Author

priteau commented Mar 6, 2024

The code has changed since my initial patch. I will have to review if my fix is still relevant with the current code.

@priteau
Copy link
Contributor Author

priteau commented Mar 10, 2024

The code has changed since my initial patch. I will have to review if my fix is still relevant with the current code.

The issue with multipath devices appears to be fixed by #53309.

@priteau
Copy link
Contributor Author

priteau commented Mar 13, 2024

I can confirm that I don't need this patch anymore with Quincy 17.2.7 or Reef.

@priteau priteau closed this Mar 13, 2024
@priteau priteau deleted the fix_59375 branch March 13, 2024 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants