From 60d7215a067c3e89ecd091961563b40378018fe3 Mon Sep 17 00:00:00 2001 From: havengit <382829066@qq.com> Date: Mon, 11 May 2020 16:56:14 +0800 Subject: [PATCH] fix dhcp lease entry wrong hostname (#4064) When Guest VM add secondary nic, will get wrong hostname "infiniteh" from dhcp server infiniteh -->infinite cat /etc/dhcphosts.txt 02:00:0b:ef:00:04,set:192_168_4_18,192.168.4.18,gumd-tes3,infiniteh --- systemvm/debian/opt/cloud/bin/cs/CsDhcp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py b/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py index 75863726238..abbe56b3c28 100755 --- a/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py +++ b/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py @@ -188,7 +188,7 @@ class CsDhcp(CsDataBag): lease)) else: tag = entry['ipv4_address'].replace(".", "_") - self.cloud.add("%s,set:%s,%s,%s,%sh" % (entry['mac_address'], + self.cloud.add("%s,set:%s,%s,%s,%s" % (entry['mac_address'], tag, entry['ipv4_address'], entry['host_name'],