Open rkharya opened 8 years ago
Now subsequent removal of network results in below -
[cluster-admin@contiv-aci-scale-2 ~]$ netctl net rm --tenant=contiv-scale contiv-net INFO[0000] Deleting network contiv-scale:contiv-net ERRO[0000] Tenant not found [github.com/contiv/netplugin/netmaster/objApi.(*APIController).NetworkDelete apiController.go 599]
[cluster-admin@contiv-aci-scale-2 ~]$ netctl net ls --tenant=contiv-scale Tenant Network Encap type Packet tag Subnet Gateway
contiv-scale contiv-net vlan 0 172.16.0.0/20 172.16.15.254
Linking this to #337 as both are similar
[cluster-admin@contiv-aci-scale-2 ~]$ netctl net create contiv-net --subnet=172.16.0.0/20 --gateway=172.16.15.254 --encap=vlan --tenant=contiv-scale
[cluster-admin@contiv-aci-scale-2 ~]$ netctl net list --tenant=contiv-scale Tenant Network Encap type Packet tag Subnet Gateway
contiv-scale contiv-net vlan 0 172.16.0.0/20 172.16.15.254
**\ After this policy, groups and application profile were created and successfully validated at APIC. Then went to delete app-profile first, which was successful again on APIC. Then deleted tenant w/o deleting the network -
[cluster-admin@contiv-aci-scale-2 ~]$ netctl tenant rm contiv-scale INFO[0000] Deleting tenant contiv-scale [cluster-admin@contiv-aci-scale-2 ~]$ netctl tenant ls
Name
default [cluster-admin@contiv-aci-scale-2 ~]$ netctl net ls Tenant Network Encap type Packet tag Subnet Gateway
[cluster-admin@contiv-aci-scale-2 ~]$ netctl net ls --tenant=contiv-scale Tenant Network Encap type Packet tag Subnet Gateway
contiv-scale contiv-net vlan 0 172.16.0.0/20 172.16.15.254
And APIC still show tenant up. Not sure if this is expected. Ideally it should not as tenant is tied up with network, as long as we delete network first then tenant, it should be allowable. But in this case it allowed to remove tenant w/o removing associated network and network is still listing out for non-existent tenant.