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
Conversation
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>
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. |
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! |
@guits Should that be restored? I think it would be useful. |
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
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. |
I can confirm that I don't need this patch anymore with Quincy 17.2.7 or Reef. |
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