Consider nonexistent device errors when closing a LUKS device#1037
Draft
boylee1111 wants to merge 4 commits intoNetApp:stable/v23.10from
Draft
Consider nonexistent device errors when closing a LUKS device#1037boylee1111 wants to merge 4 commits intoNetApp:stable/v23.10from
boylee1111 wants to merge 4 commits intoNetApp:stable/v23.10from
Conversation
Change-Id: I4335da745be563f24232a9088ca4f2c8b4f9379b
jwebster7
reviewed
Jul 16, 2025
| // If LUKS close succeeded, the block device node should be gone. | ||
| // It's the responsibility of the kernel and udev to manage /dev/mapper entries. | ||
| // If the /dev/mapper entry lives on, log a warning and return success. | ||
| if _, err := osFs.Stat(luksDevicePath); err != nil { |
Contributor
There was a problem hiding this comment.
This check is only a proactive check for stale /dev/mapper entries. If Stat fails to find the file (the positive case) this will add incorrect log statements.
s/err != nil/err == nil to have the correct behavior.
3ae2ffd to
b3a96d3
Compare
Change-Id: Ib48a47bdb270aebcb169b605064189c91b49c055
b3a96d3 to
32d798c
Compare
… found in sysfs, causing NodeUnstage failed. Change-Id: I231d3cf9913e07947b3bf3e61591296f8373ac78
f1d0690 to
4292a1c
Compare
… and lun ID Change-Id: I091259c1c826bfec961efd7f811532fa00d7ce0c
This file contains hidden or 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
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.
Change-Id: I4335da745be563f24232a9088ca4f2c8b4f9379b
Change description
Project tracking
Do any added TODOs have an issue in the backlog?
Did you add unit tests? Why not?
Does this code need functional testing?
Is a code review walkthrough needed? why or why not?
Should additional test coverage be executed in addition to pre-merge?
Does this code need a note in the changelog?
Does this code require documentation changes?
Additional Information