Remi Bergsma created CLOUDSTACK-6665: ----------------------------------------
Summary: DHCP does not release ip addresses properly on VPC routers (edithosts.sh) Key: CLOUDSTACK-6665 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-6665 Project: CloudStack Issue Type: Bug Security Level: Public (Anyone can view this level - this is the default.) Components: SystemVM Affects Versions: 4.3.0, 4.4.0 Reporter: Remi Bergsma Priority: Critical DHCP does not release ip addresses properly on VPC routers (edithosts.sh) How to reproduce: - create vpc network with small prefix - create as many vm’s until all ip address space is consumed - delete one vm - now create a vm again: there should be an ip address freed - it does not work though. Error on router: /var/log/dnsmasq.log:May 13 12:53:16 dnsmasq-dhcp[32100]: DHCPDISCOVER(eth3) 02:00:00:0d:00:b6 no address available How to reproduce #2: - create a vm with static ip - destroy it - create vm with same static ip: this ip should be free again This does not work either: /var/log/dnsmasq.log:May 13 13:59:41 dnsmasq-dhcp[32100]: DHCPDISCOVER(eth3) 02:00:69:06:00:c1 no address available Cause: edithosts.sh is supposed to clean up addresses. edithosts.sh line 101: dhcp_release eth0 $ipv4 $(grep "$ipv4 " $DHCP_LEASES | awk '{print $2}') > /dev/null 2>&1 But it doesn’t work, because eth0 is the link local address on VPC routers. We should make the interface variable on VPC routers. It does work fine on redundant routers, for example. Because eth0 is the actual guest network. CloudStack reports to the user: Insufficient capacity. Manual work-around: Run on the router: dhcp_release eth3 02:00:69:06:00:c1 10.75.16.8 Replace eth3 with the correct interface. It logs: /var/log/messages-20140419:May 13 13:38:29 r-4197-VM cloud: edithosts: released 10.75.16.8 It now works! This an annoying bug for users that use static ip’s in their networks. Also users that deploy a lot of test vm’s in the same network are impacted. Let’s fix it :-) -- This message was sent by Atlassian JIRA (v6.2#6252)