Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

VR DHCP lease file not persistent #3272

Copy link
Copy link
@DagSonsteboSB

Description

@DagSonsteboSB
Issue body actions
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
  1. PR2427 - CLOUDSTACK-10252: Delete dnsmasq leases file on restart / CLOUDSTACK-10252: Delete dnsmasq leases file on restart #2427
  2. Old Jira issue: VR DNSmasq lease file not persistent across DHCP actions
    / https://issues.apache.org/jira/browse/CLOUDSTACK-10204
  3. Old Jira issue: New VR after network restart with cleanup is missing DNS and DHCP entries
    / https://issues.apache.org/jira/browse/CLOUDSTACK-10167
  4. Finite lease introduction in Fixes for VirtualRouters in Basic Networking, especially with mutliple ranges in VLANs #1547
  5. 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
  1. 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.

  1. 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
  1. 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
Reactions are currently unavailable

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.