[nova][metadata] EC2 compatible metadata deprecation
Mathieu Gagné
mgagne at calavera.ca
Tue Dec 17 19:36:06 UTC 2019
On Tue, Dec 17, 2019 at 1:59 PM Matt Riedemann <mriedemos at gmail.com> wrote:
>
> On 12/17/2019 12:14 PM, Mikhail Fedosin wrote:
> > Currently network_data.json doesn't contain ip addresses:
> > $ cat openstack/latest/network_data.json
> > {"services": [], "networks": [{"network_id":
> > "39376584-af8a-4307-8cc3-dbf3474f0d52", "link": "tapde154f64-0c",
> > "type": "ipv4_dhcp", "id": "network0"}], "links":
> > [{"ethernet_mac_address": "fa:16:3e:9b:55:1d", "mtu": 1450, "type":
> > "ovs", "id": "tapde154f64-0c", "vif_id":
> > "de154f64-0cb3-4c71-b449-f3f67646eb2f"}]}
>
> This seems to be something in the setup of the network(s) attached to
> the server.
>
> Looking at the code that builds the network_data.json payload, it's
> returning here for you [1]. But if you look further down the network
> info dict would contain an IP address [2]. Maybe this is a limitation of
> the subnet that is chosen if there are multiple per network [3]. I want
> to say I've seen a bug about that recently but can't track it down.
There was a spec to add all subnets to network_data.json:
https://review.opendev.org/#/c/580742/
I unfortunately don't have time anymore to work on it.
I don't know the impact on installation using DHCP instead of static IP.
> [1]
> https://github.com/openstack/nova/blob/f236c62d2eabc39b9f3301eea3be19389a930d7c/nova/virt/netutils.py#L292
> [2]
> https://github.com/openstack/nova/blob/f236c62d2eabc39b9f3301eea3be19389a930d7c/nova/virt/netutils.py#L305
> [3]
> https://github.com/openstack/nova/blob/f236c62d2eabc39b9f3301eea3be19389a930d7c/nova/virt/netutils.py#L194
More information about the openstack-discuss
mailing list