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

Notification Hub Namespaces Delete Future is broken #2254

Closed
tombuildsstuff opened this issue Jul 18, 2018 · 15 comments
Closed

Notification Hub Namespaces Delete Future is broken #2254

tombuildsstuff opened this issue Jul 18, 2018 · 15 comments
Assignees
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. Notification Hub Service This issue points to a problem in the service.

Comments

@tombuildsstuff
Copy link
Contributor

tombuildsstuff commented Jul 18, 2018

Bug Report

  • import path of package in question: github.com/Azure/azure-sdk-for-go/services/notificationhubs/mgmt/2017-04-01/notificationhubs
  • SDK version: v18.0.0
  • output of go version: go version go1.10.2 darwin/amd64

👋

Whilst working on support for Notification Hubs within Terraform - I've noticed the delete future seems to hang for the lifetime of the context passed in, and eventually fails with the following error; but only ~50% of the time.

* azurerm_notification_hub_namespace.test: Error waiting for the deletion of Notification Hub Namespace "acctestnhn-7935624892261362245" (Resource Group "acctestrg-7935624892261362245"): Future#WaitForCompletion: context has been cancelled: StatusCode=202 -- Original Error: context deadline exceeded

In the interim I've worked around this by polling for the Notification Hub Namespace ourselves until we get a 404 (update: maybe not) - but I can't tell if the Swagger or the API needs to be fixed here?

Relevant link from our side:
hashicorp/terraform-provider-azurerm#1589

Thanks!

@marstr
Copy link
Member

marstr commented Jul 19, 2018

👋

Doesn't seem like a Swagger error to me! That means @jhendrixMSFT and I are on the case.

Looking at your PR, could you tell me a little bit more about how the ARMClient.StopContext is initialized and what its lifetime looks like? I want to rule out the error your seeing coming from a timeout or cancellation from your Context. :)

@marstr
Copy link
Member

marstr commented Jul 19, 2018

If you're pretty confident that ARMClient.StopContext isn't calling for cancellation, then it could be coming from this line: Azure/go-autorest/autorest/azure/azync.go#L168

Mind checking your client's PollingDuration to ensure that it doesn't just need to be increased?

From there we can look into whether or not Future's implementation is being wonky for you.

@marstr marstr self-assigned this Jul 19, 2018
@tombuildsstuff
Copy link
Contributor Author

👋🏻 hey @marstr

Sorry I’d meant to provide more info for how we ended up working around this; after some experimentation I noticed if we repeatedly call the Delete method (and then poll ourselves to verify this has gone) this seems to eventually take place, which makes me wonder if this is a service issue instead? Unfortunately I’ve not had time to investigate either way

Hope that helps!

@marstr
Copy link
Member

marstr commented Jul 20, 2018

Oh oh, that's very interesting. So I've actually got it backwards (sorry about that), you're not having trouble with premature polling cancellation from the Future. You're having trouble with either:
a) The Future not recognizing that the namespace has indeed been deleted.
b) The namespace just legitimately isn't getting deleted by the service.

@jhendrixMSFT
Copy link
Member

I think there's something screwy with the swagger/codegen? I created a simple repro to create a namespace then delete it and the delete times out, plus I still see it in the portal. If I delete it via the portal it takes about a minute or two. So seems like the call to delete isn't really doing anything useful.

@jhendrixMSFT jhendrixMSFT assigned jhendrixMSFT and unassigned marstr Jul 30, 2018
@jhendrixMSFT
Copy link
Member

Network trace seems to indicate that the portal and SDK do the same thing. When experimenting with my test program I've noticed that sometimes if click on the namespace in the portal while the future is polling the delete succeeds.

@jhendrixMSFT
Copy link
Member

@matt-gibbs to summarize, if I create a namespace then delete it the delete never happens and the SDK times out waiting for the async operation to complete. When the DELETE is requested the API returns a 202 (accepted) and polling the URL in the Location header returns status InProgress so it seems like the delete starts but never finishes?

@matt-gibbs
Copy link

investigating

@vladbarosan vladbarosan added Notification Hub Service Attention Workflow: This issue is responsible by Azure service team. Blocked and removed committed labels Oct 4, 2018
@jhendrixMSFT
Copy link
Member

@matt-gibbs any update?

@RickWinter RickWinter added customer-reported Issues that are reported by GitHub users external to the Azure organization. and removed Sprint-121 labels Jul 12, 2021
@ghost ghost added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Jul 12, 2021
@RickWinter
Copy link
Member

@matt-gibbs Can this issue be resolved?

@marstr
Copy link
Member

marstr commented Jul 14, 2021

Howdy - lot's has changed in the last few years. I actually ended up moving to work for @matt-gibbs on Notification Hubs, before he moved to GitHub.

Without getting into detail - enough has changed in our RP that there's no reason to believe that a bug this old is still applicable. We should close it as stale.

@RickWinter RickWinter removed Service Attention Workflow: This issue is responsible by Azure service team. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team labels Aug 11, 2021
@ghost ghost added the needs-team-triage Workflow: This issue needs the team to triage. label Aug 11, 2021
@RickWinter RickWinter added Service This issue points to a problem in the service. and removed Blocked needs-team-triage Workflow: This issue needs the team to triage. labels Aug 11, 2021
@ghost ghost added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Aug 11, 2021
@RickWinter
Copy link
Member

Marking this old issue as addressed. If the bug still reproduces on current SDK and service please open a new issue

@RickWinter RickWinter added the issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. label Aug 11, 2021
@ghost
Copy link

ghost commented Aug 11, 2021

Hi @tombuildsstuff. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

@ghost ghost removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Aug 11, 2021
@ghost
Copy link

ghost commented Aug 11, 2021

Hi @tombuildsstuff. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

@ghost
Copy link

ghost commented Aug 18, 2021

Hi @tombuildsstuff, since you haven’t asked that we “/unresolve” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve” to reopen the issue.

@ghost ghost closed this as completed Aug 18, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. Notification Hub Service This issue points to a problem in the service.
Projects
None yet
Development

No branches or pull requests

6 participants