Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5C96B108C9 for ; Wed, 17 Jul 2013 17:35:50 +0000 (UTC) Received: (qmail 28264 invoked by uid 500); 17 Jul 2013 17:35:26 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 28089 invoked by uid 500); 17 Jul 2013 17:35:23 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 26711 invoked by uid 99); 17 Jul 2013 17:35:01 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jul 2013 17:35:01 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 028CC8AC565; Wed, 17 Jul 2013 17:35:01 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: chipchilders@apache.org To: commits@cloudstack.apache.org Date: Wed, 17 Jul 2013 17:35:28 -0000 Message-Id: In-Reply-To: <3faeaf39edf94446882d887c431d21b9@git.apache.org> References: <3faeaf39edf94446882d887c431d21b9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [29/50] [abbrv] git commit: updated refs/heads/ldapplugin to 7bc705e Cloudstack-3313 Cannot deploy vm in ipv6 network Signed-off-by: Abhinandan Prateek Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6b549074 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6b549074 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6b549074 Branch: refs/heads/ldapplugin Commit: 6b549074fa239af31920b5a8e7112c8f5aa0b782 Parents: d95d55a Author: Bharat Kumar Authored: Tue Jul 16 11:40:01 2013 +0530 Committer: Abhinandan Prateek Committed: Wed Jul 17 10:06:11 2013 +0530 ---------------------------------------------------------------------- .../systemvm/debian/config/etc/init.d/cloud-early-config | 9 ++++++++- .../com/cloud/configuration/ConfigurationManagerImpl.java | 3 ++- server/src/com/cloud/network/NetworkManagerImpl.java | 6 ++++-- 3 files changed, 14 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6b549074/patches/systemvm/debian/config/etc/init.d/cloud-early-config ---------------------------------------------------------------------- diff --git a/patches/systemvm/debian/config/etc/init.d/cloud-early-config b/patches/systemvm/debian/config/etc/init.d/cloud-early-config index f93c39d..5835c4d 100755 --- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config +++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config @@ -544,7 +544,14 @@ setup_dnsmasq() { [ $ETH0_IP ] && echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf [ $ETH0_IP6 ] && echo "dhcp-option=option6:dns-server,$NS6" >> /etc/dnsmasq.conf #adding the name data-server to the /etc/hosts for allowing the access to user-data service and ssh-key reset in every subnet. - echo "$ETH0_IP data-server" >> /etc/hosts + if [ -n "$ETH0_IP" ] + then + echo "$ETH0_IP data-server" >> /etc/hosts + fi + if [ -n "$ETH0_IP6" ] + then + echo "$ETH0_IP6 data-server" >> /etc/hosts + fi } setup_sshd(){ http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6b549074/server/src/com/cloud/configuration/ConfigurationManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java index fd170bd..bdb5260 100755 --- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java +++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java @@ -2831,6 +2831,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati ip6Gateway = network.getIp6Gateway(); ip6Cidr = network.getIp6Cidr(); _networkModel.checkIp6Parameters(startIPv6, endIPv6, ip6Gateway, ip6Cidr); + sameSubnet = true; } } } @@ -2846,7 +2847,7 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati vlanDetails = new Pair(newVlanGateway, newVlanNetmask); } // check if the gatewayip is the part of the ip range being added. - if (NetUtils.ipRangesOverlap(startIP, endIP, vlanDetails.first(), vlanDetails.first())) { + if (ipv4 && NetUtils.ipRangesOverlap(startIP, endIP, vlanDetails.first(), vlanDetails.first())) { throw new InvalidParameterValueException( "The gateway ip should not be the part of the ip range being added."); } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6b549074/server/src/com/cloud/network/NetworkManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java index f6e9a0a..0e80119 100755 --- a/server/src/com/cloud/network/NetworkManagerImpl.java +++ b/server/src/com/cloud/network/NetworkManagerImpl.java @@ -2004,8 +2004,10 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L _networkModel.isProviderSupportServiceInNetwork(network.getId(), Service.Dhcp, element.getProvider()) && element instanceof DhcpServiceProvider) { DhcpServiceProvider sp = (DhcpServiceProvider) element; - if (!sp.configDhcpSupportForSubnet(network, profile, vmProfile, dest, context)) { - return false; + if (profile.getIp6Address() == null) { + if (!sp.configDhcpSupportForSubnet(network, profile, vmProfile, dest, context)) { + return false; + } } sp.addDhcpEntry(network, profile, vmProfile, dest, context); }