ISSUE TYPE
COMPONENT NAME
Component: API, UI
CLOUDSTACK VERSION
Cloudstack 4.18
SUMMARY
Delete domain with clean up doesn't delete the network and vpc offerings associated with the domain
When a domain is deleted , the associated service offerings, disk offerings of the domain are getting deleted.
But the network offerings associated are not getting cleaned up
Steps to reproduce the issue
- Create domain
Example :
create domain name=d5
{
"domain": {
"haschild": false,
"id": "a1b45b18-fc5e-439a-9511-a5396ed4057d",
"level": 1,
"name": "d5",
"parentdomainid": "988c9240-1c93-11ee-beea-1e00c60001a2",
"parentdomainname": "ROOT",
"path": "ROOT/d5",
"secondarystoragetotal": 0
}
}
- Create network offering or vpc offering assoicated with the domain
create networkoffering name=n1 displaytext=n1 domainid=a1b45b18-fc5e-439a-9511-a5396ed4057d guestiptype=Isolated traffictype=guest
{
"networkoffering": {
"availability": "Optional",
"conservemode": true,
"created": "2023-07-26T10:01:59+0000",
"displaytext": "n1",
"domain": "/d5/",
"domainid": "a1b45b18-fc5e-439a-9511-a5396ed4057d",
"egressdefaultpolicy": true,
"fortungsten": false,
"forvpc": false,
"guestiptype": "Isolated",
"hasannotations": false,
"id": "da3215c8-f140-41ba-b5e6-e4b511f24cb1",
"internetprotocol": "IPv4",
"isdefault": false,
"ispersistent": false,
"name": "n1",
"networkrate": 200,
"service": [],
"serviceofferingid": "e46ec2fa-9ffe-455a-91a4-f0491efdbd17",
"specifyipranges": false,
"specifyvlan": false,
"state": "Disabled",
"supportspublicaccess": false,
"supportsstrechedl2subnet": false,
"traffictype": "Guest"
}
}
create vpcoffering domainid=a1b45b18-fc5e-439a-9511-a5396ed4057d displaytext=v1 name=v1 supportedservices=dhcp
{
"vpcoffering": {
"created": "2023-07-26T10:02:06+0000",
"displaytext": "v1",
"distributedvpcrouter": false,
"domain": "/d5/",
"domainid": "a1b45b18-fc5e-439a-9511-a5396ed4057d",
"id": "a5d5af01-3861-4195-820e-bd6cd4c4053a",
"internetprotocol": "IPv4",
"isdefault": false,
"name": "v1",
"service": [
{
"name": "Dhcp",
"provider": [
{
"name": "VpcVirtualRouter"
}
]
},
{
"name": "NetworkACL",
"provider": [
{
"name": "VpcVirtualRouter"
}
]
},
{
"name": "SourceNat",
"provider": [
{
"name": "VpcVirtualRouter"
}
]
}
],
"state": "Disabled",
"supportsregionLevelvpc": false
}
}
-
Verify the network/vpc offering created in the respective domain
-
Delete the domain
delete domain id=a1b45b18-fc5e-439a-9511-a5396ed4057d
{
"success": true
}
- Notice the network and vpc offering are still present in the UI and the api output of list networkoffering and list vpc offering still lists them


list networkofferings name=n1
{
"count": 1,
"networkoffering": [
{
"availability": "Optional",
"conservemode": true,
"created": "2023-07-26T10:01:59+0000",
"displaytext": "n1",
"domain": "/d5/",
"domainid": "a1b45b18-fc5e-439a-9511-a5396ed4057d",
"egressdefaultpolicy": true,
"fortungsten": false,
"forvpc": false,
"guestiptype": "Isolated",
"hasannotations": false,
"id": "da3215c8-f140-41ba-b5e6-e4b511f24cb1",
"internetprotocol": "IPv4",
"isdefault": false,
"ispersistent": false,
"name": "n1",
"networkrate": 200,
"service": [],
"serviceofferingid": "e46ec2fa-9ffe-455a-91a4-f0491efdbd17",
"specifyipranges": false,
"specifyvlan": false,
"state": "Disabled",
"supportspublicaccess": false,
"supportsstrechedl2subnet": false,
"traffictype": "Guest"
}
]
}
list vpcofferings name=v1
{
"count": 1,
"vpcoffering": [
{
"created": "2023-07-26T10:02:06+0000",
"displaytext": "v1",
"distributedvpcrouter": false,
"domain": "/d5/",
"domainid": "a1b45b18-fc5e-439a-9511-a5396ed4057d",
"id": "a5d5af01-3861-4195-820e-bd6cd4c4053a",
"internetprotocol": "IPv4",
"isdefault": false,
"name": "v1",
"service": [
{
"name": "Dhcp",
"provider": [
{
"name": "VpcVirtualRouter"
}
]
},
{
"name": "NetworkACL",
"provider": [
{
"name": "VpcVirtualRouter"
}
]
},
{
"name": "SourceNat",
"provider": [
{
"name": "VpcVirtualRouter"
}
]
}
],
"state": "Disabled",
"supportsregionLevelvpc": false
}
]
}
Actual behavior
Delete domain with cleanup is not deleting the network and vpc offerings
Expected behavior
Delete domain with cleanup should delete the network and vpc offerings also
ISSUE TYPE
COMPONENT NAME
Component: API, UI
CLOUDSTACK VERSION
Cloudstack 4.18
SUMMARY
Delete domain with clean up doesn't delete the network and vpc offerings associated with the domain
When a domain is deleted , the associated service offerings, disk offerings of the domain are getting deleted.
But the network offerings associated are not getting cleaned up
Steps to reproduce the issue
Example :
Verify the network/vpc offering created in the respective domain
Delete the domain
Actual behavior
Delete domain with cleanup is not deleting the network and vpc offerings
Expected behavior
Delete domain with cleanup should delete the network and vpc offerings also