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

provider/scaleway: retry volume attachment #9972

Merged
merged 1 commit into from
Nov 8, 2016
Merged

provider/scaleway: retry volume attachment #9972

merged 1 commit into from
Nov 8, 2016

Conversation

nicolai86
Copy link
Contributor

@nicolai86 nicolai86 commented Nov 8, 2016

this PR fixes a flakyness in the scaleway_volume_attachment resource, as
described below:

when attaching/ detaching a volume from a scaleway_server, the server ne
be stopped. even though the code already waits for the server to be stoppe
PatchServer calls gets a 400 server is being stopped or rebooted error
response.

If the API returns the 400 we bail, leaving terraform in a broken state.

Assuming this is the only error that the API might return to us, as the payload
itself is correct, this retry behaviour should fix the issue.

Tests are green, and I could not reproduce the flakyness in multiple test runs:

make testacc TEST=./builtin/providers/scaleway TESTARGS='-run=TestAccScalewayVolumeAttachment_Basic'
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2016/11/08 22:21:30 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/scaleway -v -run=TestAccScalewayVolumeAttachment_Basic -timeout 120m
=== RUN   TestAccScalewayVolumeAttachment_Basic
--- PASS: TestAccScalewayVolumeAttachment_Basic (511.87s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/scaleway    511.884s

\cc @stack72 please take a look

this PR fixes a flakyness in the `scaleway_volume_attachment` resource, as
described below:

when attaching/ detaching a volume from a `scaleway_server`, the server needs to
be stopped. even though the code already waits for the server to be stopped, the
`PatchServer` calls gets a `400 server is being stopped or rebooted` error
response.

If the API returns the `400` we bail, leaving terraform in a broken state.

Assuming this is the only error that the API might return to us, as the payload
itself is correct, this retry behaviour should fix the issue.

\cc @stack72 PTAL
@stack72
Copy link
Contributor

stack72 commented Nov 8, 2016

Seems like a Sane addition to me :) thanks for fixing this up

@stack72 stack72 merged commit b0772b9 into hashicorp:master Nov 8, 2016
@nicolai86 nicolai86 deleted the scaleway/retry-volume-attachment branch November 8, 2016 21:59
gusmat pushed a commit to gusmat/terraform that referenced this pull request Dec 6, 2016
…#9972)

this PR fixes a flakyness in the `scaleway_volume_attachment` resource, as
described below:

when attaching/ detaching a volume from a `scaleway_server`, the server needs to
be stopped. even though the code already waits for the server to be stopped, the
`PatchServer` calls gets a `400 server is being stopped or rebooted` error
response.

If the API returns the `400` we bail, leaving terraform in a broken state.

Assuming this is the only error that the API might return to us, as the payload
itself is correct, this retry behaviour should fix the issue.

\cc @stack72 PTAL
@ghost
Copy link

ghost commented Apr 20, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants