You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ya...@apache.org on 2014/07/29 01:02:46 UTC

git commit: updated refs/heads/master to f47cfc6

Repository: cloudstack
Updated Branches:
  refs/heads/master 45c9f03e1 -> f47cfc6eb


CLOUDSTACK-7186: Revert "CLOUDSTACK-7182: NPE while trying to deploy VMs in parallel in isolated network"

This reverts commit 47d6a64b319ab064c4b855346f2bfdb250fb9ad8, which broke VPC
completely.


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

Branch: refs/heads/master
Commit: f47cfc6eb16bf0fa5830327207a2d3fdf24ab700
Parents: 45c9f03
Author: Sheng Yang <sh...@citrix.com>
Authored: Mon Jul 28 15:47:44 2014 -0700
Committer: Sheng Yang <sh...@citrix.com>
Committed: Mon Jul 28 16:02:21 2014 -0700

----------------------------------------------------------------------
 .../engine/orchestration/NetworkOrchestrator.java   | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f47cfc6e/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 20f8212..64a1f3a 100755
--- a/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java
@@ -925,7 +925,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
 
     boolean isNetworkImplemented(NetworkVO network) {
         Network.State state = network.getState();
-        if (state == Network.State.Implemented) {
+        if (state == Network.State.Implemented || state == Network.State.Implementing) {
             return true;
         } else if (state == Network.State.Setup) {
             DataCenterVO zone = _dcDao.findById(network.getDataCenterId());
@@ -1277,19 +1277,7 @@ public class NetworkOrchestrator extends ManagerBase implements NetworkOrchestra
         });
 
         for (NicVO nic : nics) {
-            Pair<NetworkGuru, NetworkVO> implemented = null;
-            if (vmProfile.getVirtualMachine().getType() != Type.DomainRouter) {
-                implemented = implementNetwork(nic.getNetworkId(), dest, context);
-            } else {
-                // At the time of implementing network (using implementNetwork() method), if the VR needs to be deployed then
-                // it follows the same path of regular VM deployment. This leads to a nested call to implementNetwork() while
-                // preparing VR nics. This flow creates issues in dealing with network state transitions. The original call
-                // puts network in "Implementing" state and then the nested call again tries to put it into same state resulting
-                // in issues. In order to avoid it, implementNetwork() call for VR is replaced with below code.
-                NetworkVO network = _networksDao.findById(nic.getNetworkId());
-                NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, network.getGuruName());
-                implemented = new Pair<NetworkGuru, NetworkVO>(guru, network);
-            }
+            Pair<NetworkGuru, NetworkVO> implemented = implementNetwork(nic.getNetworkId(), dest, context);
             if (implemented == null || implemented.first() == null) {
                 s_logger.warn("Failed to implement network id=" + nic.getNetworkId() + " as a part of preparing nic id=" + nic.getId());
                 throw new CloudRuntimeException("Failed to implement network id=" + nic.getNetworkId() + " as a part preparing nic id=" + nic.getId());