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

rbd: unmap rbd image if the mounting fails #1135

Merged
merged 3 commits into from
Jun 5, 2020

Conversation

Madhu-1
Copy link
Collaborator

@Madhu-1 Madhu-1 commented Jun 5, 2020

There is a bug in the current code where the device path is always empty and the rbd image unmap never happens if node plugin fails to mount the rbd image to the staging path.

This is a fix to unmap the rbd image if some issue occurs after the rbd image is mapped.

Signed-off-by: Madhu Rajanna [email protected]

Backport of #1078

There is a bug in current code where the devicePath
is always empty and the rbd image unmap never
happens if nodeplugin fails to mount the rbd image
to the stagingpath.
This is a fix to unmap the rbd image if some issue
occurs after rbd image is mapped.

Signed-off-by: Madhu Rajanna <[email protected]>
(cherry picked from commit 2f7e510)
Updated E2E code to pass mountoptions when
creating a storageclass.

Signed-off-by: Madhu Rajanna <[email protected]>
(cherry picked from commit 78cdf9d)
Added a test case to cover unmap of rbd image
if the mounting fails. if we pass the invalid
mount option the expectation is that mounting
of rbd image to stagingpath fails. as the unmap
happens it should not block the rbd pvc deletion
saying rbd image is in-use.

Signed-off-by: Madhu Rajanna <[email protected]>
(cherry picked from commit 44da7ff)
@Madhu-1 Madhu-1 requested review from nixpanic and humblec June 5, 2020 04:58
@Madhu-1 Madhu-1 mentioned this pull request Jun 5, 2020
5 tasks
@Madhu-1
Copy link
Collaborator Author

Madhu-1 commented Jun 5, 2020

Merging this one as CI is passed

@Madhu-1 Madhu-1 merged commit 958d2b3 into ceph:release-v2.1 Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants