You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In-memory record never released before next reboot of virtual router, finally run out of ip address, new vm can not get ip from dhcp.
Reproduce
1. Create vpc with redundant router and vm
2. After vm success boot up, expunge it.
3. Check `/var/lib/misc/dnsmasq.leases`, the vm record still there.
Research
When expunging vm, cloudstack will call shell command like dhcp_release eth3 172.29.101.250 02:02:00:d4:00:4f try to release in-memory dhcp record in dnsmasq in virtual router vm
the dhcp_release command will actually do nothing, because dnsmasq will check the server address in config is matching the request address. check the dnsmasq source code below
Or patch /opt/cloud/bin/cs/CsDhcp.py in virtual router
if self.cl.is_redundant():
listen_address.append(gateway)
listen_address.append(ip) # <<<<< add this
else:
listen_address.append(ip)
The text was updated successfully, but these errors were encountered:
hulucc
changed the title
Expunge vm not release in-memory dhcp record in vpc virtual route correctly
Expunge vm not release in-memory dhcp record in vpc redundant virtual route correctly
Jan 14, 2025
Environment
cloudstack 4.19.1.2
Problem
In-memory record never released before next reboot of virtual router, finally run out of ip address, new vm can not get ip from dhcp.
Reproduce
Research
dhcp_release eth3 172.29.101.250 02:02:00:d4:00:4f
try to release in-memory dhcp record in dnsmasq in virtual router vmdhcp_release
command will actually do nothing, because dnsmasq will check the server address in config is matching the request address. check the dnsmasq source code belowdhcp_release
is requesting the primary address, and dnsmasq is listening the secondary address.Workaround
Add both primary and secondary address to
cloud.conf
make it works.Or patch
/opt/cloud/bin/cs/CsDhcp.py
in virtual routerThe text was updated successfully, but these errors were encountered: