-
Notifications
You must be signed in to change notification settings - Fork 64
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
iscsi: capture and log iscsi disconnect error #43
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a scenario where disconnect fails but we want to continue? Would this potentially leak connections?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we should always continue when dealing with iscsi disconnects IMO, and in fact we are; this change only add a log warning if the disconnect fails but it doesn't change or stop the disconnect sequence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, we are just capturing and moving on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I'm wondering about is if we should be retrying to disconnect after the first failed attempt. Could we end up leaking a bunch of connections after some time and cause other issues down the line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@humblec is this resolved? Should we be returning an error and failing instead of continuing? This is the error sequence I'm concerned about:
os.Remove
succeeds.The reason why I'm concerned about this is because we encountered data corruption in in-tree fc plugin due to the volume not being successfully cleaned up from the node and a pod rescheduled to another node and then rescheduled again back to the original node. However the disk was not reattached since it was already connected and the pod ended up updating stale data causing corruption. kubernetes/kubernetes#101791
A couple more questions about this disconnect and general unpublish flow:
cc @jsafrane
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@msau42 there are some good amount of changes required in the csi-lib-iscsi which has been done at my local test , but not part of this PR. There is also a PR (kubernetes-csi/csi-lib-iscsi#29) from @paullaffitte which carry almost the same fixes , for example # kubernetes-csi/csi-lib-iscsi#29 (comment), but need to make sure we are not breaking the consumers with those changes. I have a discussion scheduled with Paul about coordinating the effort and to get the library in a good shape first so that it can be pulled over here.
Cc @xing-yang @jsafrane @saad-ali
I will revert on the final action items to take these forward.
Till then we can hold this PR.