Checking the /etc/dnsmasq.d/cloud.conf file which contains the defaults for each tier it is however found this is now double populated for each of the two tiers:
root@r-339-VM:~# cat /etc/dnsmasq.d/cloud.conf
dhcp-hostsfile=/etc/dhcphosts.txt
dhcp-range=set:interface-eth2-0,10.21.2.1,static
dhcp-option=tag:interface-eth2-0,15,cs2cloud.internal
dhcp-option=tag:interface-eth2-0,6,10.21.2.1,8.8.8.8,8.8.4.4
dhcp-option=tag:interface-eth2-0,3,10.21.2.1
dhcp-option=tag:interface-eth2-0,1,255.255.255.0
dhcp-range=set:interface-eth3-1,10.21.1.1,static
dhcp-option=tag:interface-eth3-1,15,cs2cloud.internal
dhcp-option=tag:interface-eth3-1,6,10.21.1.1,8.8.8.8,8.8.4.4
dhcp-option=tag:interface-eth3-1,3,10.21.1.1
dhcp-option=tag:interface-eth3-1,1,255.255.255.0
dhcp-range=set:interface-eth3-0,10.21.1.1,static
dhcp-option=tag:interface-eth3-0,15,cs2cloud.internal
dhcp-option=tag:interface-eth3-0,6,10.21.1.1,8.8.8.8,8.8.4.4
dhcp-option=tag:interface-eth3-0,3,10.21.1.1
dhcp-option=tag:interface-eth3-0,1,255.255.255.0
dhcp-range=set:interface-eth2-1,10.21.2.1,static
dhcp-option=tag:interface-eth2-1,15,cs2cloud.internal
dhcp-option=tag:interface-eth2-1,6,10.21.2.1,8.8.8.8,8.8.4.4
dhcp-option=tag:interface-eth2-1,3,10.21.2.1
dhcp-option=tag:interface-eth2-1,1,255.255.255.0
ISSUE TYPE
COMPONENT NAME
CLOUDSTACK VERSION
REFERENCES
/ https://issues.apache.org/jira/browse/CLOUDSTACK-10204
/ https://issues.apache.org/jira/browse/CLOUDSTACK-10167
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
VPC multihomed VMs DHCP partially broken:
What still works:
What is very broken:
STEPS TO REPRODUCE
VPC VR tier VMs not getting DHCP leases:
VPC created: super CIDR is 10.21.0.0/16, tier1 is 10.21.1.0/24, tier2 is 10.21.2.0/24
VM created and attached to one tier1 only.
VM at this point gets DHCP address OK on eth0
VR files
root@r-339-VM:
# cat /etc/dhcphosts.txt# cat /var/lib/misc/dnsmasq.leases02:00:2c:78:00:01,10.21.1.33,CROSSTIER1,723h
root@r-339-VM:
1557669293 02:00:2c:78:00:01 10.21.1.33 CROSSTIER1
Second VPC tier2 added to VM, all lease files removed and VM restarted
VM comes online with no DHCP lease for eth0 but dhcp lease for eth1.
/etc/dhcphosts is found to be empty:
root@r-339-VM:~# cat /etc/dnsmasq.d/dhcphosts.txt
Leases file show only the eth1 lease - BUT note this is not marked ("set") as being a secondary NIC:
root@r-339-VM:~# cat /var/lib/misc/dnsmasq.leases
1557806022 02:00:5e:96:00:03 10.21.2.238 CROSSTIER1
Note /etc/dhcpopts.txt is populated as it should be when a NIC is secondary - although there is no tag matching that will make this active:
root@r-339-VM:~# cat /etc/dhcpopts.txt
10_21_2_238,3
10_21_2_238,6
10_21_2_238,15
Probably unrelated (unknown what this file is used for) but the /etc/dnsmasq.d/dhcphosts.txt file is also empty:
root@r-339-VM:~# cat /etc/dnsmasq.d/dhcphosts.txt
Checking the /etc/dnsmasq.d/cloud.conf file which contains the defaults for each tier it is however found this is now double populated for each of the two tiers:
root@r-339-VM:~# cat /etc/dnsmasq.d/cloud.conf
dhcp-hostsfile=/etc/dhcphosts.txt
dhcp-range=set:interface-eth2-0,10.21.2.1,static
dhcp-option=tag:interface-eth2-0,15,cs2cloud.internal
dhcp-option=tag:interface-eth2-0,6,10.21.2.1,8.8.8.8,8.8.4.4
dhcp-option=tag:interface-eth2-0,3,10.21.2.1
dhcp-option=tag:interface-eth2-0,1,255.255.255.0
dhcp-range=set:interface-eth3-1,10.21.1.1,static
dhcp-option=tag:interface-eth3-1,15,cs2cloud.internal
dhcp-option=tag:interface-eth3-1,6,10.21.1.1,8.8.8.8,8.8.4.4
dhcp-option=tag:interface-eth3-1,3,10.21.1.1
dhcp-option=tag:interface-eth3-1,1,255.255.255.0
dhcp-range=set:interface-eth3-0,10.21.1.1,static
dhcp-option=tag:interface-eth3-0,15,cs2cloud.internal
dhcp-option=tag:interface-eth3-0,6,10.21.1.1,8.8.8.8,8.8.4.4
dhcp-option=tag:interface-eth3-0,3,10.21.1.1
dhcp-option=tag:interface-eth3-0,1,255.255.255.0
dhcp-range=set:interface-eth2-1,10.21.2.1,static
dhcp-option=tag:interface-eth2-1,15,cs2cloud.internal
dhcp-option=tag:interface-eth2-1,6,10.21.2.1,8.8.8.8,8.8.4.4
dhcp-option=tag:interface-eth2-1,3,10.21.2.1
dhcp-option=tag:interface-eth2-1,1,255.255.255.0
Logs show eth1 not being present in host file:
Apr 12 11:52:41 dnsmasq-dhcp[5302]: DHCPDISCOVER(eth3) 02:00:2c:78:00:01 no address available
Apr 12 11:52:44 dnsmasq-dhcp[5302]: DHCPDISCOVER(eth3) 02:00:2c:78:00:01 no address available
Apr 12 11:52:52 dnsmasq-dhcp[5302]: DHCPDISCOVER(eth3) 02:00:2c:78:00:01 no address available
Apr 12 11:53:07 dnsmasq-dhcp[5302]: DHCPDISCOVER(eth3) 02:00:2c:78:00:01 no address available
Apr 12 11:53:24 dnsmasq-dhcp[5302]: DHCPDISCOVER(eth3) 02:00:2c:78:00:01 no address available
Apr 12 11:53:42 dnsmasq-dhcp[5302]: DHCPDISCOVER(eth2) 02:00:5e:96:00:03
Apr 12 11:53:42 dnsmasq-dhcp[5302]: DHCPOFFER(eth2) 10.21.2.238 02:00:5e:96:00:03
Apr 12 11:53:42 dnsmasq-dhcp[5302]: DHCPREQUEST(eth2) 10.21.2.238 02:00:5e:96:00:03
Apr 12 11:53:42 dnsmasq-dhcp[5302]: DHCPACK(eth2) 10.21.2.238 02:00:5e:96:00:03 CROSSTIER1
EXPECTED RESULTS
ACTUAL RESULTS