Skip to content

Multiple Public Subnets Single Shared Network ( Metadata Error ) #4931

@BenjaminM007

Description

@BenjaminM007
ISSUE TYPE
  • Bug Report
COMPONENT NAME
VR
CLOUDSTACK VERSION
4.15
CONFIGURATION

Advanced Networking with SG
One defaultGuestNetwork ( 2 x subnets setup using legacy interface.
Example: 188.165.185.64/28 51.255.101.128/26

The first subnet /28 was added when the guestnetwork was created. We can manually add an IP from the /26 subnet ( using the legacy interface and DHCP is working and IP is assigned to the instance. When querying the metadata server for the password the instance seeks out the /28 VR gateway which fails.

OS / ENVIRONMENT
SUMMARY

Creating more than one public CIDR in the DefaultGuestNetwork fails to obtain password from cloud-init metadata server.

STEPS TO REPRODUCE
2021-04-16 13:29:47,489 - DataSourceCloudStack.py[DEBUG]: Crawl of metadata service took 0 seconds
2021-04-16 13:29:47,489 - util.py[DEBUG]: Running command ['wget', '--quiet', '--tries', '3', '--timeout', '20', '--output-document', '-', '--header', 'DomU_Request: send_my_password', ' xxx.xxx.xxx..100:8080'] with allowed return codes [0] (shell=False, capture=True)
2021-04-16 13:30:51,568 - util.py[WARNING]: Failed to fetch password from virtual router 188.165.185.100
2021-04-16 13:30:51,570 - util.py[DEBUG]: Failed to fetch password from virtual router  188.165.185.100
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cloudinit/sources/DataSourceCloudStack.py", line 131, in _get_data
    set_password = password_client.get_password()
  File "/usr/lib/python2.7/site-packages/cloudinit/sources/DataSourceCloudStack.py", line 58, in get_password
    password = self._do_request('send_my_password')
  File "/usr/lib/python2.7/site-packages/cloudinit/sources/DataSourceCloudStack.py", line 53, in _do_request
    '{0}:8080'.format(self.virtual_router_address)
  File "/usr/lib/python2.7/site-packages/cloudinit/util.py", line 2084, in subp
    cmd=args)
ProcessExecutionError: Unexpected error while running command.
Command: ['wget', '--quiet', '--tries', '3', '--timeout', '20', '--output-document', '-', '--header', 'DomU_Request: send_my_password', ' xxx.xxx.xxx.:8080']
Exit code: 4




1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 1e:00:52:01:02:43 brd ff:ff:ff:ff:ff:ff
    inet 188.165.185.100/27 brd 188.165.185.127 scope global eth0
       valid_lft forever preferred_lft forever
    inet 51.255.101.129/26 brd 51.255.101.191 scope global eth0
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 0e:00:a9:fe:7f:ef brd ff:ff:ff:ff:ff:ff
    inet 169.254.127.239/16 brd 169.254.255.255 scope global eth1
       valid_lft forever preferred_lft forever
EXPECTED RESULTS
  • Obtain password from VR
  • instance should query correct gateway of VR for the additional subnet.

ACTUAL RESULTS
  • Failed to fetch password from virtual router 188.165.185.100 |  
    -- | --

  • Instance is using gateway from the subnet that was originally created when the defaultnetwork was setup.
    Get request to the VR using both IP and DNS name is working as per below. Curl request inside the instance works. When booting a Ubuntu or CentOS instance cloud-init times out when accessing the server_password.


curl http://data-server./latest/meta-data/local-hostname
Test51[root@test51 cloud.cfg.d]# 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions