Page MenuHomeVyOS Platform

Cloud-init not finding data source in OpenStack
Closed, ResolvedPublicBUG

Description

Building off the current branch using the AWS target, and the (restored in my branch) OpenStack target results in images which don't pick up any configuration from the OpenStack metadata service - even using the EC2 URIs which i have verified to work via curl from inside the instance.
When i run cloud-init clean ; cloud-init init, the terminal output contains an error claiming that there is no metadata service:

root@vyos:/tmp# cloud-init init
Cloud-init v. 20.1-373-g9862faf2-1~bddeb running 'init' at Thu, 16 Sep 2021 15:30:36 +0000. Up 22520.18 seconds.
ci-info: +++++++++++++++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++++++++++++++
ci-info: +--------+-------+------------------------------+---------------+--------+-------------------+
ci-info: | Device |   Up  |           Address            |      Mask     | Scope  |     Hw-Address    |
ci-info: +--------+-------+------------------------------+---------------+--------+-------------------+
ci-info: |  eth0  |  True |         10.231.253.1         | 255.255.255.0 | global | fa:16:3e:31:b8:73 |
ci-info: |  eth0  |  True | fe80::f816:3eff:fe31:b873/64 |       .       |  link  | fa:16:3e:31:b8:73 |
ci-info: |  eth1  | False |              .               |       .       |   .    | fa:16:3e:66:7d:67 |
ci-info: |  eth2  | False |              .               |       .       |   .    | fa:16:3e:97:4d:d0 |
ci-info: |   lo   |  True |          127.0.0.1           |   255.0.0.0   |  host  |         .         |
ci-info: |   lo   |  True |    fe80::200:ff:fe00:0/64    |       .       |  link  |         .         |
ci-info: |   lo   |  True |           ::1/128            |       .       |  host  |         .         |
ci-info: +--------+-------+------------------------------+---------------+--------+-------------------+
ci-info: ++++++++++++++++++++++++++++++++Route IPv4 info+++++++++++++++++++++++++++++++++
ci-info: +-------+-----------------+--------------+-----------------+-----------+-------+
ci-info: | Route |   Destination   |   Gateway    |     Genmask     | Interface | Flags |
ci-info: +-------+-----------------+--------------+-----------------+-----------+-------+
ci-info: |   0   |     0.0.0.0     | 10.231.253.1 |     0.0.0.0     |    eth0   |   UG  |
ci-info: |   1   |   10.117.254.0  | 10.231.253.2 |  255.255.255.0  |    eth0   |   UG  |
ci-info: |   2   |   10.217.252.0  | 10.231.253.2 | 255.255.255.248 |    eth0   |   UG  |
ci-info: |   3   |   10.231.253.0  |   0.0.0.0    |  255.255.255.0  |    eth0   |   U   |
ci-info: |   4   | 169.254.169.254 | 10.231.253.7 | 255.255.255.255 |    eth0   |  UGH  |
ci-info: +-------+-----------------+--------------+-----------------+-----------+-------+
ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++
ci-info: +-------+-------------+---------+-----------+-------+
ci-info: | Route | Destination | Gateway | Interface | Flags |
ci-info: +-------+-------------+---------+-----------+-------+
ci-info: |   2   |  fe80::/64  |    ::   |    eth0   |   U   |
ci-info: |   5   |   anycast   |    ::   |    eth0   |   U   |
ci-info: |   7   |    local    |    ::   |    eth0   |   U   |
ci-info: |   8   |  multicast  |    ::   |    eth0   |   U   |
ci-info: +-------+-------------+---------+-----------+-------+
2021-09-16 15:30:42,779 - util.py[WARNING]: No active metadata service found
2021-09-16 15:30:42,860 - stages.py[ERROR]: Unable to render networking. Network config is likely broken: No available network renderers found. Searched through list: ['eni', 'sysconfig', 'netplan', 'freebsd']
2021-09-16 15:30:42,896 - stages.py[WARNING]: Could not find module named cc_resizefs_vyos (searched ['cc_resizefs_vyos', 'cloudinit.config.cc_resizefs_vyos'])

which results in no SSH key import, no hostname config, and no interface data passed down to the instance (eth2 in this case is on the WAN VLAN direct without DHCP).
Haven't tried this in actual AWS, but my openstack target has every metadata service enabled in its 90_dpkg.cfg

Details

Version
1.4-current
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

sempervictus renamed this task from Cloud-init not inding data source in OpenStack to Cloud-init not finding data source in OpenStack.Sep 16 2021, 3:59 PM

Curl checks come back with:

root@vyos:/tmp# curl 169.254.169.254/latest/meta-data
ami-id
ami-launch-index
ami-manifest-path
block-device-mapping/
hostname
instance-action
instance-id
instance-type
local-hostname
local-ipv4
placement/
public-hostname
public-ipv4
public-keys/
reservation-id
security-groups

Is it still bug? @sempervictus could you re-check?
We probably need more details

Oh wow, this is ancient. Can definitely close this out - @zsdc and i figured out a bunch of the insanity around cloud-init since then and i've got it working in our openstacks as well as public clouds on a single config.

Viacheslav claimed this task.

@sempervictus Thanks for the update!