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:34:58 UTC

git commit: updated refs/heads/4.4-forward to be937a0

Repository: cloudstack
Updated Branches:
  refs/heads/4.4-forward 9dfbdb5ff -> be937a082


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/be937a08
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/be937a08
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/be937a08

Branch: refs/heads/4.4-forward
Commit: be937a08213f06a801cf07d19867d48dad35d19f
Parents: 9dfbdb5
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:03:28 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/be937a08/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