cloudstack/systemvm/debian
Wei Zhou b25823213b
vr: remove old ips with same mac address in dhcpentry databag (#5059)
This PR fixes #5058

when start a vm, the old entries in databag for the vm (with same mac addresses) should be removed then set again, to avoid duplicated records in dhcpentry databag and also /etc/dhcphosts.txt 

Testing with Isolated networks:
(1) stop vm, change vm ip address, start vm
vm info is updated in /etc/dhcphosts.txt and /etc/cloudstack/dhcpentry.json
(2) stop vm, expunge vm.
vm is removed from /etc/dhcphosts.txt and /var/lib/misc/dnsmasq.leases

Testing with VPC:
(1) create vm in 2 vpc tiers
vm has 2 entries in /etc/dhcphosts.txt, and /etc/cloudstack/dhcpentry.json
(2) stop vm, change ip addresses, change nics order, start vm
entries are updated in /etc/dhcphosts.txt and /etc/cloudstack/dhcpentry.json
(3) remove a nic from vm (hot unplug)
vm nic is removed from /etc/dhcphosts.txt and /var/lib/misc/dnsmasq.leases
entry in /etc/cloudstack/dhcpentry.json is updated.
2021-06-01 20:57:26 +05:30
..
etc Merge remote-tracking branch 'origin/4.14' into 4.15 2021-04-10 13:41:50 +05:30
opt/cloud vr: remove old ips with same mac address in dhcpentry databag (#5059) 2021-06-01 20:57:26 +05:30
root Handle port forward rule check for vpc and non vpc Isolated net… (#3963) 2020-03-13 09:20:42 +01:00
var/www/html CLOUDSTACK-10013: SystemVM codebase refactorings and improvements 2017-12-23 09:22:44 +05:30