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
osd_volume_activate: support ceph-disk based OSDs via ceph-volume #1684
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After upgrading to nautilus, the OSD deployed by ceph-disk needs to be manage by ceph-volume with the simple subcommand. This was part of the osd_ceph_disk_activate entrypoint but there's no need to have a separate entrypoint because at the end we are using the same command : ceph-volume. Signed-off-by: Dimitri Savineau <dsavinea@redhat.com> (cherry picked from commit d467a30)
This commit adds dmcrypt cleanup support when osd is stopped. Otherwise, once a dmcrypt osd is stopped, the resource is still accessible. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com> (cherry picked from commit 90511a4)
90511a4 introduced a bug in osd_volume_lvm function. OSDs couldn't start because `$CEPH_VOLUME_LIST_JSON` is seen as an empty variable when consumed in this function. Since there's no need to have a separate function for detecting the volume type, let's refact this part of the code so we can fix this issue. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com> (cherry picked from commit bbf493d)
`$DATA` isn't a path to a file. This commit fixes the error : "File name too long" Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com> (cherry picked from commit 9bc10f3)
Loop devices are like nvme or cciss devices because the partitions are referenced with an extra 'p' before the partition number. Signed-off-by: Dimitri Savineau <dsavinea@redhat.com> (cherry picked from commit 21d0b04)
When managing legacy ceph-disk based OSD with ceph-volume then we need to open the encrypted partitions before running the ceph-volume simple scan command otherwise the scan will fail. This situation happens after a reboot because all encrypted partitions are closed. $ ceph-volume simple scan /dev/sdb1 --force (...) --> broken symlink found /tmp/tmpept0ox2j/block -> /dev/mapper/457d7196-4015-40fe-aa83-a160477450f7 $ ceph-volume.log (...) [ceph_volume.util.system][INFO ] /dev/sdb1 was not found as mounted [ceph_volume.util.encryption][WARNING] failed to detect device mapper information [ceph_volume.util.encryption][WARNING] failed to detect device mapper information [ceph_volume.devices.simple.scan][WARNING] broken symlink found /tmp/tmpept0ox2j/block -> /dev/mapper/457d7196-4015-40fe-aa83-a160477450f7 [ceph_volume.devices.simple.scan][ERROR ] skipping due to IOError on file: /tmp/tmpept0ox2j/block Traceback (most recent call last): File "/usr/lib/python3.6/site-packages/ceph_volume/devices/simple/scan.py", line 118, in scan_directory if system.is_binary(file_path): File "/usr/lib/python3.6/site-packages/ceph_volume/util/system.py", line 116, in is_binary with open(path, 'rb') as fp: FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpept0ox2j/block' [ceph_volume.util.encryption][WARNING] failed to detect device mapper information [ceph_volume.devices.simple.scan][INFO ] skipping binary file: /tmp/tmpept0ox2j/block_dmcrypt Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1792122 Signed-off-by: Dimitri Savineau <dsavinea@redhat.com> (cherry picked from commit d07436a)
To find the correct OSD id in all the OSD devices we need to scan them. This requires to mount the lockbox partitions and open the encrypted partitions when using dmcrypt. After the ceph-volume simple scan command we should umount the lockbox partitions otherwise each OSD containers will mount all lockbox partitions. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1806033 Signed-off-by: Dimitri Savineau <dsavinea@redhat.com> (cherry picked from commit 82a1ee7)
jenkins test ceph_ansible-lvm_osds |
1 similar comment
jenkins test ceph_ansible-lvm_osds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for managing ceph-disk based OSDs via ceph-volume simple commands when using the
OSD_CEPH_VOLUME_ACTIVATE
entrypoint.Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1844591
Signed-off-by: Dimitri Savineau dsavinea@redhat.com