cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aprat...@apache.org
Subject git commit: updated refs/heads/master to f9e7094
Date Thu, 20 Jun 2013 05:46:08 GMT
Updated Branches:
  refs/heads/master 7b6b8d7a0 -> f9e709428


Cloudstack-2644 [Multiple_IP_Ranges] user data service on VR does not work in case of multiple
subnets Cloudstack-2953 [Multiple_IP_Ranges] VM does not get the public key from VR incase
of multiple subnets per vlan Also removed some unused code and fixed the an error in the dnsmasq
config function

Signed-off-by: Abhinandan Prateek <aprateek@apache.org>


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

Branch: refs/heads/master
Commit: f9e709428298c25ea50dd77a3d227a37c326922a
Parents: 7b6b8d7
Author: Bharat Kumar <bharat.kumar@citrix.com>
Authored: Wed Jun 19 11:53:48 2013 +0530
Committer: Abhinandan Prateek <aprateek@apache.org>
Committed: Thu Jun 20 11:15:15 2013 +0530

----------------------------------------------------------------------
 .../debian/config/etc/init.d/cloud-early-config |  2 +
 .../VirtualNetworkApplianceManagerImpl.java     |  3 +-
 server/src/com/cloud/vm/dao/NicIpAliasDao.java  |  1 -
 .../src/com/cloud/vm/dao/NicIpAliasDaoImpl.java |  9 -----
 setup/bindir/cloud-set-guest-sshkey.in          | 39 +++++---------------
 5 files changed, 14 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f9e70942/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 0dcd571..b215271 100755
--- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config
+++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config
@@ -540,6 +540,8 @@ setup_dnsmasq() {
   NS6=${NS6%?}
   [ $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
 }
 
 setup_sshd(){

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f9e70942/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
index 2e75277..c9dee9c 100755
--- a/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
+++ b/server/src/com/cloud/network/router/VirtualNetworkApplianceManagerImpl.java
@@ -3430,7 +3430,7 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase
implements V
 
     private void configDnsMasq(VirtualRouter router, Network network, Commands cmds) {
         DataCenterVO dcVo = _dcDao.findById(router.getDataCenterId());
-        List<NicIpAliasVO> ipAliasVOList = _nicIpAliasDao.getAliasIpForVm(router.getId());
+        List<NicIpAliasVO> ipAliasVOList = _nicIpAliasDao.listByNetworkIdAndState(network.getId(),
NicIpAlias.state.active);
         List<DnsmasqTO> ipList = new ArrayList<DnsmasqTO>();
 
         NicVO router_guest_nic = _nicDao.findByNtwkIdAndInstanceId(network.getId(), router.getId());
@@ -3444,6 +3444,7 @@ public class VirtualNetworkApplianceManagerImpl extends ManagerBase
implements V
         for (NicIpAliasVO ipAliasVO : ipAliasVOList) {
              DnsmasqTO dnsmasqTO = new DnsmasqTO(ipAliasVO.getIp4Address(), ipAliasVO.getGateway(),
ipAliasVO.getNetmask(), ipAliasVO.getStartIpOfSubnet());
              ipList.add(dnsmasqTO);
+             ipAliasVO.setVmId(router.getId());
         }
         DataCenterVO dcvo = _dcDao.findById(router.getDataCenterId());
         DnsMasqConfigCommand dnsMasqConfigCmd = new DnsMasqConfigCommand(network.getNetworkDomain(),ipList,
dcvo.getDns1(), dcvo.getDns2(), dcvo.getInternalDns1(), dcvo.getInternalDns2());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f9e70942/server/src/com/cloud/vm/dao/NicIpAliasDao.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/dao/NicIpAliasDao.java b/server/src/com/cloud/vm/dao/NicIpAliasDao.java
index f1e4b8e..2a0da92 100644
--- a/server/src/com/cloud/vm/dao/NicIpAliasDao.java
+++ b/server/src/com/cloud/vm/dao/NicIpAliasDao.java
@@ -57,5 +57,4 @@ public interface NicIpAliasDao extends GenericDao<NicIpAliasVO, Long>
{
 
     List<NicIpAliasVO> listByNetworkIdAndState(long networkId, NicIpAlias.state state);
 
-    List<NicIpAliasVO> listByNetworkIdAndAliasIpAndState(long networkId, String aliasIpOfSubnet,
NicIpAlias.state state);
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f9e70942/server/src/com/cloud/vm/dao/NicIpAliasDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/dao/NicIpAliasDaoImpl.java b/server/src/com/cloud/vm/dao/NicIpAliasDaoImpl.java
index e6c52a2..2cd8a2f 100644
--- a/server/src/com/cloud/vm/dao/NicIpAliasDaoImpl.java
+++ b/server/src/com/cloud/vm/dao/NicIpAliasDaoImpl.java
@@ -92,15 +92,6 @@ public class NicIpAliasDaoImpl extends GenericDaoBase<NicIpAliasVO,
Long> implem
     }
 
     @Override
-    public List<NicIpAliasVO> listByNetworkIdAndAliasIpAndState(long networkId, String
aliasIpOfSubnet, NicIpAlias.state state) {
-        SearchCriteria<NicIpAliasVO> sc = AllFieldsSearch.create();
-        sc.setParameters("network", networkId);
-        sc.setParameters("address", aliasIpOfSubnet);
-        sc.setParameters("state", state);
-        return listBy(sc);
-    }
-
-    @Override
     public List<NicIpAliasVO> listByNicIdAndVmid(long nicId, long vmId) {
         SearchCriteria<NicIpAliasVO> sc = AllFieldsSearch.create();
         sc.setParameters("nicId", nicId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f9e70942/setup/bindir/cloud-set-guest-sshkey.in
----------------------------------------------------------------------
diff --git a/setup/bindir/cloud-set-guest-sshkey.in b/setup/bindir/cloud-set-guest-sshkey.in
index f3f02b1..9436b03 100755
--- a/setup/bindir/cloud-set-guest-sshkey.in
+++ b/setup/bindir/cloud-set-guest-sshkey.in
@@ -26,37 +26,18 @@
 # Modify this line to specify the user (default is root)
 user=root
 
+SSHKEY_SERVER_IP=$(nslookup data-server | grep Server | awk '{print $2}')
+logger -t "cloud" "Sending request to ssh key server at $SSHKEY_SERVER_IP"
 
+publickey=$(wget -t 3 -T 20 -O - http://data-server/latest/public-keys 2>/dev/null)
 
-# Add your DHCP lease folders here
-DHCP_FOLDERS="/var/lib/dhclient/* /var/lib/dhcp3/*"
-keys_received=0
-file_count=0
-
-for DHCP_FILE in $DHCP_FOLDERS
-do
-	if [ -f $DHCP_FILE ]
-	then
-		file_count=$((file_count+1))
-		SSHKEY_SERVER_IP=$(grep dhcp-server-identifier $DHCP_FILE | tail -1 | awk '{print $NF}'
| tr -d '\;')
-
-		if [ -n "$SSHKEY_SERVER_IP" ]
-		then
-			logger -t "cloud" "Sending request to ssh key server at $SSHKEY_SERVER_IP"
-
-			publickey=$(wget -t 3 -T 20 -O - http://$SSHKEY_SERVER_IP/latest/public-keys 2>/dev/null)
-
-			if [ $? -eq 0 ]
-			then
-				logger -t "cloud" "Got response from server at $SSHKEY_SERVER_IP"
-				keys_received=1
-				break
-			fi
-		else
-			logger -t "cloud" "Could not find ssh key server IP in $DHCP_FILE"
-		fi
-	fi
-done
+if [ $? -eq 0 ]
+then
+     logger -t "cloud" "Got response from server at $SSHKEY_SERVER_IP"
+     keys_received=1
+else
+     logger -t "cloud" "Could not find ssh key server IP in $DHCP_FILE"
+fi
 
 # did we find the keys anywhere?
 if [ "$keys_received" == "0" ]


Mime
View raw message