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 2013/12/16 14:35:57 UTC
git commit: updated refs/heads/master to c6c2995
Updated Branches:
refs/heads/master e2915c6ce -> c6c299523
CLOUDSTACK-4616: When system Vms fail to start when host is down , link
local Ip addresses do not get released resulting in all the link local
Ip addresses being consumed eventually.
fix ensure Nics with reservation strategy 'Start' should go through
release phase in the Nic life cycle so that release is performed before
Nic is removed to avoid resource leaks.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c6c29952
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c6c29952
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c6c29952
Branch: refs/heads/master
Commit: c6c299523151345bbc3c97614c8ac995676e229b
Parents: e2915c6
Author: Murali Reddy <mu...@gmail.com>
Authored: Mon Dec 16 19:00:29 2013 +0530
Committer: Murali Reddy <mu...@gmail.com>
Committed: Mon Dec 16 19:05:35 2013 +0530
----------------------------------------------------------------------
.../engine/orchestration/NetworkOrchestrator.java | 11 +++++++++++
1 file changed, 11 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c6c29952/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
index cbe02ff..1505d41 100755
--- a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
@@ -1517,6 +1517,17 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
}
protected void removeNic(VirtualMachineProfile vm, NicVO nic) {
+
+ if (nic.getReservationStrategy() == Nic.ReservationStrategy.Start && nic.getState() != Nic.State.Allocated) {
+ // Nics with reservation strategy 'Start' should go through release phase in the Nic life cycle.
+ // Ensure that release is performed before Nic is to be removed to avoid resource leaks.
+ try {
+ releaseNic(vm, nic.getId());
+ } catch (Exception ex) {
+ s_logger.warn("Failed to release nic: " + nic.toString() + " as part of remove operation due to", ex );
+ }
+ }
+
nic.setState(Nic.State.Deallocating);
_nicDao.update(nic.getId(), nic);
NetworkVO network = _networksDao.findById(nic.getNetworkId());