-
Notifications
You must be signed in to change notification settings - Fork 9
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
BUG 2153695: osd: Fix osd-prepare-job for encrypted cluster #440
Conversation
This commit implements this corner case during osd-prepare job. ``` The encrypted block is not opened, this is an extreme corner case The OSD deployment has been removed manually AND the node rebooted So we need to re-open the block to re-hydrate the OSDInfo. Handling this case would mean, writing the encryption key on a temporary file, then call luksOpen to open the encrypted block and then call ceph-volume to list against the opened encrypted block. We don't implement this, yet and return an error. ``` When underlying PVC for osd are CSI provisioned, the encrypted device is closed when PVC is unmounted due to osd pod being deleted. Therefore, this may occur more frequently and needs to be handled. This commit implements the fix for the same. Signed-off-by: Rakshith R <rar@redhat.com> (cherry picked from commit bde286e)
@Rakshith-R: This pull request references Bugzilla bug 2153695, which is valid. The bug has been updated to refer to the pull request using the external bug tracker. 2 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: nehaberry. Note that only red-hat-storage members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
During osd-prepare-job, The encrypted device is found to be closed in some cases when the OSD deployment has been removed manually accompanied by any of following cases: - node reboot - csi managed PVC being unmounted etc while re-opening the block to re-hydrate the OSDInfo, the dm device `<pvc-name>-block-dmcrypt` clashes with the one used by OSD pod which is stale by now. This commit adds cmd to remove this stale dm device. Error with output "No such device" is ignored. Signed-off-by: Rakshith R <rar@redhat.com> (cherry picked from commit 24fa9ed)
/bugzilla refresh /cc @travisn @BlaineEXE @red-hat-storage/rook-admins |
@Rakshith-R: This pull request references Bugzilla bug 2153695, which is valid. 2 validation(s) were run on this bug
Requesting review from QA contact: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@openshift-ci[bot]: GitHub didn't allow me to request PR reviews from the following users: nehaberry. Note that only red-hat-storage members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Rakshith-R, travisn The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@Rakshith-R: All pull requests linked via external trackers have merged: Bugzilla bug 2153695 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Description of your changes:
osd: re-open encrypted disk during osd-prepare-job if closed
This commit implements this corner case during osd-prepare job.
When underlying PVC for osd are CSI provisioned, the encrypted device
is closed when PVC is unmounted due to osd pod being deleted.
Therefore, this may occur more frequently and needs to be handled.
This commit implements the fix for the same.
Signed-off-by: Rakshith R rar@redhat.com
(cherry picked from commit bde286e)
osd: remove stale dm device during osd-prepare-job
During osd-prepare-job,
The encrypted device is found to be closed in some cases when
the OSD deployment has been removed manually accompanied
by any of following cases:
while re-opening the block to re-hydrate the OSDInfo,
the dm device
<pvc-name>-block-dmcrypt
clashes withthe one used by OSD pod which is stale by now.
This commit adds cmd to remove this stale dm device.
Error with output "No such device" is ignored.
Signed-off-by: Rakshith R rar@redhat.com
(cherry picked from commit 24fa9ed)
Which issue is resolved by this Pull Request:
Resolves #
Checklist:
skip-ci
on the PR.