Merge pull request #981 from serbaut/repopulate-dhcphost

CLOUDSTACK-8993: DHCP fails with "no address available" when an IP is reused

Repopulate /etc/dhcphosts.txt to remove old entries with the same IP address.

* pr/981:
  CLOUDSTACK-8993: DHCP fails with "no address available" when an IP is reused

Signed-off-by: Remi Bergsma <github@remi.nl>
This commit is contained in:
Remi Bergsma 2015-10-29 15:56:54 +01:00
commit 323a2aaa2a

View File

@ -37,6 +37,8 @@ class CsDhcp(CsDataBag):
self.cloud = CsFile(DHCP_HOSTS)
self.conf = CsFile(CLOUD_CONF)
self.cloud.repopulate()
for item in self.dbag:
if item == "id":
continue