-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Description
ISSUE TYPE
- Bug Report - BLOCKER
- Improvement request
COMPONENT NAME
- VR dnsmasq DHCP
CLOUDSTACK VERSION
- ACS 4.11.2
- ACS 4.12 not tested but assumed issues are still present looking at code changes
- Regressions from / previously present in ACS 4.9 / 4.10 / 4.11
REFERENCES
- PR2427 - CLOUDSTACK-10252: Delete dnsmasq leases file on restart / CLOUDSTACK-10252: Delete dnsmasq leases file on restart #2427
- Old Jira issue: VR DNSmasq lease file not persistent across DHCP actions
/ https://issues.apache.org/jira/browse/CLOUDSTACK-10204 - Old Jira issue: New VR after network restart with cleanup is missing DNS and DHCP entries
/ https://issues.apache.org/jira/browse/CLOUDSTACK-10167 - Finite lease introduction in Fixes for VirtualRouters in Basic Networking, especially with mutliple ranges in VLANs #1547
- Also check related issue VR DHCP VPC multihomed VM broken #3273
CONFIGURATION
- ACS4.11.2
- Isolated guest networks and VPC networks
OS / ENVIRONMENT
- Any
SUMMARY
- Leases file is not persistent across network operations:
- Refer to ref fix rpm/deb build error #2 above.
- Leases continues to be not persistent across dnsmasq restarts / additions - i.e. leases file is wiped and leases are not remembered.
- This causes the guest VM dhcp client to get an "NAK" DHCP deny on DHCP renewal, and have to go through the normal procedure again of DISCOVER>OFFER>REQUEST>ACK. For some guest OS versions (RedHat has shown this) where static routes are used the initial "NAK" will break these static routes, leading to problems in the guest OS, i.e. the VM will get a new lease but will have lost it's static routes.
- Improvement request: Lease time for DHCP options is still hard coded to randint(700,760) hours:
https://github.com/apache/cloudstack/blob/master/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py#L145
- Since this ends up in the packaged systemvm.iso file dynamically managing this might be a problem
- When looking at this issue could 5 mins be spent considering if the lease time could be put in as a global setting
STEPS TO REPRODUCE
- Leases file is not persistent across network operations:
- Create VM
- Check contents of /var/lib/misc/dnsmasq.leases
- Create second VM
- Observe contents of /var/lib/misc/dnsmasq.leases is wiped
- Now wipe the lease file on the first VM and restart network
- Observe the /var/log/dnsmasq.log shows entries for a full DISCOVER>OFFER>REQUEST>ACK process rather than a renew
EXPECTED RESULTS
- Leases persistent throughout lifetime of VM
ACTUAL RESULTS
- Leases not persistent causing static route problems on guest VMs