You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mu...@apache.org on 2014/06/13 13:35:51 UTC

git commit: updated refs/heads/master to 515ef0d

Repository: cloudstack
Updated Branches:
  refs/heads/master cdb3dc97b -> 515ef0de4


CLOUDSTACK-6832: [OVS]vnet is not released even the network is deleted

fix ensures allocated VNET is released during network shutdown


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/515ef0de
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/515ef0de
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/515ef0de

Branch: refs/heads/master
Commit: 515ef0de4f0d08eb70c1411160606a0822859463
Parents: cdb3dc9
Author: Murali Reddy <mu...@gmail.com>
Authored: Fri Jun 13 17:03:28 2014 +0530
Committer: Murali Reddy <mu...@gmail.com>
Committed: Fri Jun 13 17:05:44 2014 +0530

----------------------------------------------------------------------
 .../ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/515ef0de/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java b/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java
index de74108..3ca25f7 100644
--- a/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java
+++ b/plugins/network-elements/ovs/src/com/cloud/network/guru/OvsGuestNetworkGuru.java
@@ -189,7 +189,12 @@ public class OvsGuestNetworkGuru extends GuestNetworkGuru {
             return;
         }
 
-        super.shutdown(profile, offering);
+        if (profile.getBroadcastDomainType() == BroadcastDomainType.Vswitch ) {
+            s_logger.debug("Releasing vnet for the network id=" + profile.getId());
+            _dcDao.releaseVnet(BroadcastDomainType.getValue(profile.getBroadcastUri()), profile.getDataCenterId(), profile.getPhysicalNetworkId(),
+                    profile.getAccountId(), profile.getReservationId());
+        }
+        profile.setBroadcastUri(null);
     }
 
     @Override