Skip to content

data-server IP provided to the cloud-init if not from the same subnet #5518

Closed

Description

@ccycv
ISSUE TYPE
  • Bug Report
COMPONENT NAME
  • VR
CLOUDSTACK VERSION
  • Tested in 4.14.x, 4.15.0, 4,15.1, 4,15.2
CONFIGURATION

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.

Activity

  1. weizhouapache commented on Sep 28, 2021

    @weizhouapache
    Member

    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

  2. added this to the 4.16.0.0 milestone on Sep 29, 2021
  3. added a commit that references this issue on Sep 29, 2021
    28392da
  4. 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
  5. added a commit that references this issue on Oct 4, 2021
    9f5ac89
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions