Skip to content

[Network Function] Traffic Collector DELETE API is broken #25152

Open
@ms-zhenhua

Description

@ms-zhenhua

Swagger Link

Problem Description

When attempting to delete a Traffic Collector instance and Collector Policy instance via Azure API, the flow failed as illustrated below.

First, delete the Collector Policy instance as below:

DELETE https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctest-rg-230729201336796314/providers/Microsoft.NetworkFunction/azureTrafficCollectors/acctest-nfatc-230729201336796314/collectorPolicies/acctest-nfcp-230729201336796314?api-version=2022-11-01

which returns a Long Running Request as shown below:

HTTP/2.0 202 Accepted

Then send several GET request to get Status:

GET https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctest-rg-230729201336796314/providers/Microsoft.NetworkFunction/azureTrafficCollectors/acctest-nfatc-230729201336796314/collectorPolicies/acctest-nfcp-230729201336796314?api-version=2022-11-01

which eventually returns Not Found(which should mean that the Collector Policy instance has been deleted):

HTTP/2.0 404 Not Found

At this time - it should be possible to delete the Traffic Collector instance (as its Collector Policy has already been deleted). Attempting to do so:

DELETE https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctest-rg-230729201336796314/providers/Microsoft.NetworkFunction/azureTrafficCollectors/acctest-nfatc-230729201336796314?api-version=2022-11-01

which failed with:

HTTP/2.0 409 Conflict
{
    "error": {
        "code": "CannotDeleteResource",
        "message": "Cannot delete resource while nested resources exist. Some existing nested resource IDs include: 'Microsoft.NetworkFunction/azureTrafficCollectors/acctest-nfatc-230729201336796314/collectorPolicies/acctest-nfcp-230729201336796314'. Please delete all nested resources before deleting this resource."
    }
}

It looks like the same issue as #18572.
The correlationId is:

X-Ms-Correlation-Request-Id: bd13eb95-342d-18a4-60dc-6945dbd58fba

Kindly help confirm this bug.
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NetworkService AttentionWorkflow: This issue is responsible by Azure service team.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions