cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From muralire...@apache.org
Subject git commit: updated refs/heads/master to 5f42e29
Date Tue, 27 Aug 2013 19:34:48 GMT
Updated Branches:
  refs/heads/master c3a275fc7 -> 5f42e2937


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


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

Branch: refs/heads/master
Commit: 5f42e2937d5a7b32b84e1b07af49711d25504529
Parents: c3a275f
Author: Murali Reddy <muralimmreddy@gmail.com>
Authored: Wed Aug 28 00:31:15 2013 +0530
Committer: Murali Reddy <muralimmreddy@gmail.com>
Committed: Wed Aug 28 00:49:38 2013 +0530

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5f42e293/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 98533a0..4657c27 100755
--- a/server/src/com/cloud/network/guru/DirectNetworkGuru.java
+++ b/server/src/com/cloud/network/guru/DirectNetworkGuru.java
@@ -207,6 +207,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