Skip to content

Can not delete port/subnet/router when clean up resource #174

@huangtianhua

Description

@huangtianhua

Let's make things better!

Describe the bug

Can not delete subnet, port and router when clean up resources for fusioncloud job. And the reason is that we add the subnet to the router in acctests, so we have to remove the subnet from the router
first.

Related Job information

If the bug is related a CI job, put the job information below:

++ openstack --insecure router list -f value -c ID -c Name
2019-01-27 19:22:38.768773 | ubuntu-xenial | ++ awk '{ print $1 }'
2019-01-27 19:22:38.769067 | ubuntu-xenial | ++ grep -E 'test_vpc|vpc_test|vpc_test1|router_1|router_2|terraform_provider_test|terraform_provider_test1|terraform-testacc-vpc-data-source'
2019-01-27 19:22:42.818818 | ubuntu-xenial | + openstack --insecure router delete 2d4a083d-9126-4934-93eb-907b08455d88 48634f1b-70dc-40a5-9898-cacd8c5048ff 937051f6-e462-4643-b2a1-d64eacf34596
2019-01-27 19:22:51.316975 | ubuntu-xenial | Failed to delete router with name or ID '2d4a083d-9126-4934-93eb-907b08455d88': ConflictException: 409: Client Error for url: https://vpc-api.fusioncloud.huawei.com/v2.0/routers/2d4a083d-9126-4934-93eb-907b08455d88, Router contains subnets, please delete subnet first.
2019-01-27 19:22:59.584134 | ubuntu-xenial | Failed to delete router with name or ID '937051f6-e462-4643-b2a1-d64eacf34596': ConflictException: 409: Client Error for url: https://vpc-api.fusioncloud.huawei.com/v2.0/routers/937051f6-e462-4643-b2a1-d64eacf34596, Router contains subnets, please delete subnet first.
2019-01-27 19:22:59.584525 | ubuntu-xenial | 2 of 3 routers failed to delete.

Steps to reproduce the issue

NA

Additional context

NA

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions