Skip to content

Commit 515ef0d

Browse files
committed
CLOUDSTACK-6832: [OVS]vnet is not released even the network is deleted
fix ensures allocated VNET is released during network shutdown
1 parent cdb3dc9 commit 515ef0d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,12 @@ public void shutdown(NetworkProfile profile, NetworkOffering offering) {
189189
return;
190190
}
191191

192-
super.shutdown(profile, offering);
192+
if (profile.getBroadcastDomainType() == BroadcastDomainType.Vswitch ) {
193+
s_logger.debug("Releasing vnet for the network id=" + profile.getId());
194+
_dcDao.releaseVnet(BroadcastDomainType.getValue(profile.getBroadcastUri()), profile.getDataCenterId(), profile.getPhysicalNetworkId(),
195+
profile.getAccountId(), profile.getReservationId());
196+
}
197+
profile.setBroadcastUri(null);
193198
}
194199

195200
@Override

0 commit comments

Comments
 (0)