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

Assume detached state on 404 during ControllerUnpublishVolume #221

Merged
merged 1 commit into from
Nov 27, 2019

Conversation

timoreimann
Copy link
Contributor

Previously we would bubble up 404 HTTP response codes during controller unpublish (i.e., volume detachment) events as errors to the invoking external-provisioner, causing the sidecar to go into an infinite retry loop. This change short-circuits the behavior by returning a success message to the caller.

One case where we see the problematic behavior occurring is when users detach volumes directly (i.e., outside of Kubernetes).

@timoreimann timoreimann changed the base branch from tidy-up-modules to master November 27, 2019 15:47
Copy link
Member

@nanzhong nanzhong left a comment

Choose a reason for hiding this comment

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

Good find. The way we map the combination of response code + error message to resultant actions confuses me every time 😕.

pvs, err := client.CoreV1().PersistentVolumes().List(metav1.ListOptions{})
if err != nil {
t.Fatal(err)
}Wait
Copy link
Member

Choose a reason for hiding this comment

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

Trailing Wait Snuck in accidentally?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah thanks, good catch -- not sure how that happened.

I wonder if we should extend our CI run to at least build the CI tests. They are on a different build tag, so regular go test won't catch it.

Previously we would bubble up 404 HTTP response codes during controller
unpublish (i.e., volume detachment) events as errors to the invoking
external-provisioner, causing the sidecar to go into an infinite retry
loop. This change short-circuits the behavior by returning a success
message to the caller.

One case where we see the problematic behavior occurring is when users
detach volumes directly (i.e., outside of Kubernetes).
@timoreimann
Copy link
Contributor Author

Pushed an update to the change log as well.

@timoreimann timoreimann merged commit 80fcd39 into master Nov 27, 2019
@timoreimann timoreimann deleted the assume-detached-on-404 branch November 27, 2019 21:48
@timoreimann timoreimann mentioned this pull request Dec 18, 2019
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.

3 participants