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

Subnet previously used by deleted api management service cannot be deleted #4409

Closed
jhendrixMSFT opened this issue Nov 6, 2018 · 22 comments
Closed
Assignees

Comments

@jhendrixMSFT
Copy link
Member

Seems like ApiManagementService_Delete should be a long-running operation.
See Azure/azure-sdk-for-go#2199 for more details.

@tombuildsstuff
Copy link
Contributor

@jhendrixMSFT out of interest, is there a rough timeframe for this?

@jhendrixMSFT
Copy link
Member Author

We need to get the RP engaged. @solankisamir do you own this?

@solankisamir
Copy link
Member

@jhendrixMSFT yes we own this. If a subnet is not freed, once the API Management service is deleted, this usually means some issue and best would be to open a support case. The subnet is freed by API Management service within 30 minutes of service getting deleted.

@jhendrixMSFT
Copy link
Member Author

@solankisamir I believe that the subnet is being freed, the question is the semantics of the API. It's returning a 200 which states that the resource has been deleted however this is misleading as the delete is in progress. Should this be modeled as a LRO? @ravbhatnagar do you have any opinion on this?

@tombuildsstuff
Copy link
Contributor

@jhendrixMSFT @solankisamir since this issue was originally opened in July 2018 would it be possible to escalate this to the Service Team? Based on this comment it appears the Subnet isn't usable for up to 2 hours during any change to it at the moment, which means we'd have to poll for this long (which I'd like to avoid if possible).

Thanks!

@solankisamir
Copy link
Member

@tombuildsstuff we are committed to fixing this behavior. But this would require a new api-version to not break existing clients. We are working on 2019-01-01 apiversion, which should be out by the end of the month.

@joranm
Copy link

joranm commented Jan 8, 2019

Hi @solankisamir, sounds good. If this will be fixed in version 2019-01-01 would be great!

@solankisamir
Copy link
Member

solankisamir commented Feb 16, 2019

We updated the service side code to make DELETE a long-running operation. Will be working through updating the REST spec and the SDKs. This is currently happening on 2018-06-01-preview version and will soon be switched to 2019-01-01

Release Notes

@hbuckle
Copy link

hbuckle commented Feb 22, 2019

@solankisamir - any idea when this will be in the specs? The problem with updating the service side before the specs is that delete operations from clients are now failing as the service is returning 202, which the client can't handle as it isn't in the specs.

@tombuildsstuff
Copy link
Contributor

The problem with updating the service side before the specs is that delete operations from clients are now failing as the service is returning 202, which the client can't handle as it isn't in the specs.

On this note - isn't this technically a breaking change since it didn't previously return this status code and this isn't listed in the Swagger?

@hbuckle
Copy link

hbuckle commented Feb 22, 2019

It is indeed - deleting api management from terraform now fails

Error deleting API Management Service "apim8naix" (Resource Group "fixtures8naix"): apimanagement.ServiceClient#Delete: Failure responding to request: StatusCode=202 -- Original Error: autorest/azure: Service returned an error. Status=202 Code="Unknown" Message="Unknown service error"

@tombuildsstuff
Copy link
Contributor

@hbuckle would you mind opening an issue on our side, so we can patch this?

@solankisamir
Copy link
Member

solankisamir commented Feb 22, 2019

The problem with updating the service side before the specs is that delete operations from clients are now failing as the service is returning 202, which the client can't handle as it isn't in the specs.

On this note - isn't this technically a breaking change since it didn't previously return this status code and this isn't listed in the Swagger?

2018-06-01-preview is a preview version of the API, where we can make breaking changes. 2019-01-01 or 2018-01-01 are stable versions, where this becomes our liability.
I will update the spec soon

@hbuckle
Copy link

hbuckle commented Feb 25, 2019

Fair point - I didn't realise Terraform was using the preview API. @tombuildsstuff 2018-01-01 is still returning 200 for deletes

@tombuildsstuff
Copy link
Contributor

tombuildsstuff commented Feb 28, 2019

@solankisamir is there an expected timeline for when the Swagger for 2019-01-01 will be available?

@hbuckle thanks for opening that issue/letting us know - @katbyte has updated TF to use the 2018-01-01 API for the moment

@tombuildsstuff
Copy link
Contributor

ping @solankisamir :)

@solankisamir
Copy link
Member

@tombuildsstuff we are just wrapping up a couple of changes required for the stable api-version change. Will update the thread asap. Should be done within a week or two.

@tombuildsstuff
Copy link
Contributor

@solankisamir cool thanks 👍

@tombuildsstuff
Copy link
Contributor

@solankisamir
Copy link
Member

yes, the PR is in review now #5568

@tombuildsstuff
Copy link
Contributor

awesome thanks 👍
I was searching by the “API Management” label so I missed that

@solankisamir
Copy link
Member

The Spec has been released here and the GO SDK has been updated here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants