Repository: cloudstack
Updated Branches:
  refs/heads/master 24bf1c56d -> 2ebeec433

releasing dhcp leases on vpcs failes because the network tier of the tennant 
aren't behinbd eth0. Here we make interface selection dynamic.

Signed-off-by: Daan Hoogland <d...@onecht.net>


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

Branch: refs/heads/master
Commit: 2ebeec43340f33e2a00553b171452c6516ccc946
Parents: 24bf1c5
Author: Joris van Lieshout <jvanliesh...@schubergphilis.com>
Authored: Wed May 14 12:05:36 2014 +0200
Committer: Daan Hoogland <d...@onecht.net>
Committed: Wed May 14 16:11:03 2014 +0200

----------------------------------------------------------------------
 systemvm/patches/debian/config/opt/cloud/bin/edithosts.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ebeec43/systemvm/patches/debian/config/opt/cloud/bin/edithosts.sh
----------------------------------------------------------------------
diff --git a/systemvm/patches/debian/config/opt/cloud/bin/edithosts.sh 
b/systemvm/patches/debian/config/opt/cloud/bin/edithosts.sh
index 70c95a8..c1046c6 100755
--- a/systemvm/patches/debian/config/opt/cloud/bin/edithosts.sh
+++ b/systemvm/patches/debian/config/opt/cloud/bin/edithosts.sh
@@ -99,7 +99,7 @@ if [ $dnsmasq_managed_lease ]
 then
   #release previous dhcp lease if present
   logger -t cloud "edithosts: releasing $ipv4"
-  dhcp_release eth0 $ipv4 $(grep "$ipv4 " $DHCP_LEASES | awk '{print $2}') > 
/dev/null 2>&1
+  dhcp_release $(ip route get "$ipv4/32" | tr " " "\n" | grep eth) $ipv4 
$(grep "$ipv4 " $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1
   logger -t cloud "edithosts: released $ipv4"
 fi
 

Reply via email to