From 64d09c737ac5c39f8b6338999ecc1364d67ae050 Mon Sep 17 00:00:00 2001 From: Nitesh Sarda Date: Tue, 23 May 2017 17:34:20 +0530 Subject: [PATCH] CLOUDSTACK-9017 : VPC VR DHCP broken for multihomed guest VMs (cherry picked from commit 10b25adc460f89d4d98ee0c6090a4f785aa088a6) Signed-off-by: Rohit Yadav --- .../patches/debian/config/etc/vpcdnsmasq.conf | 2 ++ .../debian/config/opt/cloud/bin/cs_dhcp.py | 15 --------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/systemvm/patches/debian/config/etc/vpcdnsmasq.conf b/systemvm/patches/debian/config/etc/vpcdnsmasq.conf index 6cfc433cecf..7c29e65d269 100644 --- a/systemvm/patches/debian/config/etc/vpcdnsmasq.conf +++ b/systemvm/patches/debian/config/etc/vpcdnsmasq.conf @@ -460,3 +460,5 @@ log-facility=/var/log/dnsmasq.log # Include a another lot of configuration options. #conf-file=/etc/dnsmasq.more.conf conf-dir=/etc/dnsmasq.d + +dhcp-optsfile=/etc/dhcpopts.txt diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs_dhcp.py b/systemvm/patches/debian/config/opt/cloud/bin/cs_dhcp.py index d9f30e5ab49..41a8d7eed8e 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs_dhcp.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs_dhcp.py @@ -21,7 +21,6 @@ from netaddr import * def merge(dbag, data): - search(dbag, data['host_name']) # A duplicate ip address wil clobber the old value # This seems desirable .... if "add" in data and data['add'] is False and \ @@ -33,17 +32,3 @@ def merge(dbag, data): dbag[data['ipv4_adress']] = data return dbag - -def search(dbag, name): - """ - Dirty hack because CS does not deprovision hosts - """ - hosts = [] - for o in dbag: - if o == 'id': - continue - print "%s %s" % (dbag[o]['host_name'], name) - if dbag[o]['host_name'] == name: - hosts.append(o) - for o in hosts: - del(dbag[o])