cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anim...@apache.org
Subject [11/12] git commit: updated refs/heads/4.2 to 41d2fb3
Date Tue, 27 Aug 2013 20:14:04 GMT
CLOUDSTACK-3010: [VMWare] [SharedNetworkWithServices] router VM
deployment fails with error "Message: Invalid configuration for device
'2'."

ensuring that direct network guru assigns a mac address for the nic that
it designs
(cherry picked from commit 47fa6d95611c596d4705ffc0f422e3dab70931a5)

Signed-off-by: animesh <animesh@apache.org>


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

Branch: refs/heads/4.2
Commit: 4a5f2dd6992d2ec2d24fcb8c33aa0b6d1d67290e
Parents: 4b4315f
Author: Murali Reddy <muralimmreddy@gmail.com>
Authored: Wed Aug 28 00:31:15 2013 +0530
Committer: animesh <animesh@apache.org>
Committed: Tue Aug 27 12:56:45 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/network/guru/DirectNetworkGuru.java | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a5f2dd6/server/src/com/cloud/network/guru/DirectNetworkGuru.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/guru/DirectNetworkGuru.java b/server/src/com/cloud/network/guru/DirectNetworkGuru.java
index b4577ac..ca4f068 100755
--- a/server/src/com/cloud/network/guru/DirectNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/DirectNetworkGuru.java
@@ -204,6 +204,13 @@ public class DirectNetworkGuru extends AdapterBase implements NetworkGuru
{
         allocateDirectIp(nic, network, vm, dc, nic.getRequestedIpv4(), nic.getRequestedIpv6());
         nic.setStrategy(ReservationStrategy.Create);
 
+        if (nic.getMacAddress() == null) {
+            nic.setMacAddress(_networkModel.getNextAvailableMacAddressInNetwork(network.getId()));
+            if (nic.getMacAddress() == null) {
+                throw new InsufficientAddressCapacityException("Unable to allocate more mac
addresses", Network.class, network.getId());
+            }
+        }
+
         return nic;
     }
 


Mime
View raw message