From a01720b25b301a5fd6eb3f8f8c7588727ac1aff7 Mon Sep 17 00:00:00 2001 From: Wilder Rodrigues Date: Fri, 23 Oct 2015 16:01:17 +0200 Subject: [PATCH] CLOUDSTACK-8935 - Filter the DNS list because it might contain 1 None entry which breaks the code. --- systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py index 6200d482d9c..881cef278dc 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py +++ b/systemvm/patches/debian/config/opt/cloud/bin/cs/CsDhcp.py @@ -71,7 +71,8 @@ class CsDhcp(CsDataBag): # DNS search order if gn.get_dns() and device: sline = "dhcp-option=tag:interface-%s,6" % device - line = "dhcp-option=tag:interface-%s,6,%s" % (device, ','.join(gn.get_dns())) + dns_list = [x for x in gn.get_dns() if x is not None] + line = "dhcp-option=tag:interface-%s,6,%s" % (device, ','.join(dns_list)) self.conf.search(sline, line) # Gateway gateway = ''