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
This commit is contained in:
havengit 2020-05-11 16:56:14 +08:00 committed by GitHub
parent 8173741742
commit 60d7215a06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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'],