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

Handle error scenarios gracefully in NodeUnpublishVolume #161

Merged
merged 4 commits into from
Jan 23, 2024

Conversation

swamibluedata
Copy link

@swamibluedata swamibluedata commented Jan 18, 2024

This fixes

#158

Issue unmount if and only if the target folder is present and is a valid mount point.

Issue Remove call if and only if the target folder exists

If the mount point doesn't exist, report success, which will allow kubelet to continue with pod termination sequence

Signed-off-by: Swami Viswanathan <[email protected]>

@swamibluedata
Copy link
Author

Addressed a PR comment from the closed PR

#160

@azdagron
Copy link
Member

Hey @swamibluedata! Thanks for this contribution! If you could fix the DCO on your commit, that would be great. You can click on the "details" link to the right of the failed action.

In your case it looks like the Signed-off-by is set to one email, but the author of the commit is another. You may need to do a git commit --amend -s --reset-author to fix the commit before force pushing.

@azdagron
Copy link
Member

Looks like at least one unit test is also failing and may need to be updated based on the new behavior.

The failing integration test is unrelated (the v1.21.14 test is failing across the board at the moment).

@swamibluedata
Copy link
Author

Hey @swamibluedata! Thanks for this contribution! If you could fix the DCO on your commit, that would be great. You can click on the "details" link to the right of the failed action.

In your case it looks like the Signed-off-by is set to one email, but the author of the commit is another. You may need to do a git commit --amend -s --reset-author to fix the commit before force pushing.

Got it and will need to address the test case as well.

@swamibluedata
Copy link
Author

Looks like at least one unit test is also failing and may need to be updated based on the new behavior.

The failing integration test is unrelated (the v1.21.14 test is failing across the board at the moment).

Both the new "unable to verify mount point" error and an existing error "unable to unmount" are going to be tricky to test.

For "unable to verify mount point", i need to make enumerateMounts fail
For "unable to mount", i can run a process that opens a file on that mountpoint which will prevent unmount

Thinking

@azdagron
Copy link
Member

The unit tests for the driver package replace the various functions with those where they can inject different conditions. That's probably good enough for the unit tests. At some point we'll wire up more test cases into the integration test, which is running in a kind cluster, but for now I think unit test coverage give us the same test fidelity we have now.

@swamibluedata
Copy link
Author

Hey @swamibluedata! Thanks for this contribution! If you could fix the DCO on your commit, that would be great. You can click on the "details" link to the right of the failed action.

In your case it looks like the Signed-off-by is set to one email, but the author of the commit is another. You may need to do a git commit --amend -s --reset-author to fix the commit before force pushing.

Updated the commit, still complaining :(

37bb8fa

@azdagron
Copy link
Member

Looks like the last thing to fix is a linting error. You need to run goimports on one of the files you edited (setting up your editor to do this automatically when saving is usually the easiest path).

Signed-off-by: Swami Viswanathan <[email protected]>
@swamibluedata
Copy link
Author

@azdagron anything i need to address

Copy link
Member

@azdagron azdagron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @swamibluedata! Good to go.

@azdagron azdagron merged commit 8af6afd into spiffe:main Jan 23, 2024
9 checks passed
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