CLOUDSTACK-9017 : VPC VR DHCP broken for multihomed guest VMs

(cherry picked from commit 10b25adc460f89d4d98ee0c6090a4f785aa088a6)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Nitesh Sarda 2017-05-23 17:34:20 +05:30 committed by Rohit Yadav
parent 9effd472a1
commit 64d09c737a
2 changed files with 2 additions and 15 deletions

View File

@ -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

View File

@ -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])