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
{{ message }}
Repository navigation
data-server IP provided to the cloud-init if not from the same subnet #5518
CloudStack with VMware 6.5 with Basic or Advanced Networks.
OS / ENVIRONMENT
CentOS 7, ESXI 6.5
SUMMARY
A wrong data-server IP is provided to the cloud-init.
This issue persist for shared networks (Guest traffic) with multiple subnets in Basic network or with Advanced Networks.
STEPS TO REPRODUCE
It is simple to reproduce, add multiple CIDR to the same guest router, deploy multiple instances, when a new VM is going to be deployed under different subnet, for some reasons the returned data-server IP is not from VM subnet, it is the IP which is defined in /etc/hosts into the router, example;
149.xx.xx.99 r-xxx-VM data-server
And because it is from different subnet, there is no password saved in the file for different subnet (in router ). in this case, no password is going to be set for this VM.
If I execute this: "cat /var/lib/dhclient/dhclient--eth0.lease | grep dhcp-server-identifier" into the VM the returned IP is the right one. Even if I try to add this to VM host file( IP data-server) ,it is not working, the cloud-init it is using the IP for metadata, and not the host "http://data-server".
EXPECTED RESULTS
Expected not to have this issue, cloud-init should receive the data-server IP from same subnet as we have on the VM.
ACTUAL RESULTS
data-server IP from a different subnet is returned.
there are 3 issues
(1) /etc/hosts in VR, only has data-server for the first guest IP range
(2) the name server is the guest IP in first range which might be unreachable for IPs in other IP ranges.
(3) data-server. might not be resolved in some OS. see canonical/cloud-init#1004
changed the title [-]data-server IP provided to the cloud-init it not from the same subnet[/-][+]data-server IP provided to the cloud-init if not from the same subnet[/+]on Oct 4, 2021
Activity
weizhouapache commentedon Sep 28, 2021
there are 3 issues
(1) /etc/hosts in VR, only has data-server for the first guest IP range
(2) the name server is the guest IP in first range which might be unreachable for IPs in other IP ranges.
(3)
data-server.might not be resolved in some OS. see canonical/cloud-init#1004VR: fix data-server if shared network has multiple ip ranges
[-]data-server IP provided to the cloud-init it not from the same subnet[/-][+]data-server IP provided to the cloud-init if not from the same subnet[/+]VR: fix data-server if shared network has multiple ip ranges (#5530)