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

Retry to create storage container. #846

Merged
merged 1 commit into from
Feb 16, 2018
Merged

Retry to create storage container. #846

merged 1 commit into from
Feb 16, 2018

Conversation

genevieve
Copy link

#841

Signed-off-by: Genevieve LEsperance <[email protected]>
@@ -124,6 +125,18 @@ func resourceArmStorageContainerCreate(d *schema.ResourceData, meta interface{})
return resourceArmStorageContainerRead(d, meta)
}

func checkContainerIsCreated(reference *storage.Container) func() *resource.RetryError {
return func() *resource.RetryError {
createOptions := &storage.CreateContainerOptions{}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we explicitly set timeout here so we can effectively use the timeout duration of the Retry call? I'm not sure on the default, maybe its ok?

Copy link
Author

@genevieve genevieve Feb 16, 2018

Choose a reason for hiding this comment

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

There’s only one other instance of retrying in the codebase that’s I found and the timeout was not configurable. We can add a create timeout to the scheme if we think it should be adjustable?

Copy link
Contributor

Choose a reason for hiding this comment

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

we lean on the SDK's default timeout through the codebase, so I don't think we need to override this value? (2m should be enough time for Azure to become consistent)

Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

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

👍 LGTM - thanks for this! I'll kick off the test suite now..

@@ -124,6 +125,18 @@ func resourceArmStorageContainerCreate(d *schema.ResourceData, meta interface{})
return resourceArmStorageContainerRead(d, meta)
}

func checkContainerIsCreated(reference *storage.Container) func() *resource.RetryError {
return func() *resource.RetryError {
createOptions := &storage.CreateContainerOptions{}
Copy link
Contributor

Choose a reason for hiding this comment

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

we lean on the SDK's default timeout through the codebase, so I don't think we need to override this value? (2m should be enough time for Azure to become consistent)

@tombuildsstuff tombuildsstuff added this to the 1.1.2 milestone Feb 16, 2018
@tombuildsstuff
Copy link
Contributor

Tests pass:

screen shot 2018-02-16 at 09 45 39

@vchauhan1
Copy link

Still it's failing with the following error. azurerm_storage_container.be-sc: Error creating container "XXXXXXX" in storage account "XXXXXXXX": storage: service returned error: StatusCode=403, ErrorCode=AuthenticationFailed, ErrorMessage=Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.

@ghost
Copy link

ghost commented Mar 7, 2019

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 7, 2019
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.

5 participants