benmcguire79 opened a new issue #4931:
URL: https://github.com/apache/cloudstack/issues/4931
##### ISSUE TYPE
<!-- Pick one below and delete the rest -->
* Bug Report
##### COMPONENT NAME
<!--
Categorize the issue, e.g. API, VR, VPN, UI, etc.
-->
~~~
VR
~~~
##### CLOUDSTACK VERSION
<!--
New line separated list of affected versions, commit ID for issues on master
branch.
-->
~~~
4.15
~~~
##### CONFIGURATION
<!--
Information about the configuration if relevant, e.g. basic network,
advanced networking, etc. N/A otherwise
-->
Advanced Networking with SG
##### OS / ENVIRONMENT
<!--
Information about the environment if relevant, N/A otherwise
-->
##### SUMMARY
Creating more than one public CIDR in the DefaultGuestNetwork fails to
obtain password from cloud-init metadata server.
##### STEPS TO REPRODUCE
<!--
Deploying instances using the original public CDIR work with both SSH key
and Password authentication. We are using the templates from dl.openvm.com
As the new UI does not allow assinging secondary subnets that have been
added to CS we have used the legacy interface. Further, the new UI does not
allow assigning any IP outside of the original subnet that was added when the
GuestNetwork was created. Using the legacy interface we can add a single IP
from the newly added subnet and this get allocated to the instance successfully.
With this, SSH keys get injected but cloud-init cannot get the password from
the VR.
-->
~~~
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 xxx.xxx.xxx.100
2021-04-16 13:30:51,570 - util.py[DEBUG]: Failed to fetch password from
virtual router xxx.xxx.xxx..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
Network setup from the VR. There are 2 IPs. First one from the original
network subnet and the second from the other guest network we added. Both IPs
are using the same shared network.
~~~
root@r-73-VM:/etc/cloudstack# ip a
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:b0:00:00:04 brd ff:ff:ff:ff:ff:ff
inet xxx.xxx.xxx.100/26 brd 188.165.185.127 scope global eth0
valid_lft forever preferred_lft forever
inet xxx.xxx.xxx.131/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:20:4e brd ff:ff:ff:ff:ff:ff
inet 169.254.32.78/16 brd 169.254.255.255 scope global eth1
valid_lft forever preferred_lft forever
##### EXPECTED RESULTS
~~~
Obtain password from VR
~~~
##### ACTUAL RESULTS
~~~
Failed to fetch password from virtual router xxx.xxx.xxx..100
Get request to the VR using both IP and DNS name is working as per below.
curl http://data-server./latest/meta-data/local-hostname
Test51[root@test51 cloud.cfg.d]#
~~~
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]