This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Bug 2276701 - Nova metadata service doesn't process ipless ports properly
Summary: Nova metadata service doesn't process ipless ports properly
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 17.1 (Wallaby)
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: OSP DFG:Compute
QA Contact: OSP DFG:Compute
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-04-23 19:04 UTC by Alex Stupnikov
Modified: 2025-01-18 02:24 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2025-01-18 02:22:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   OSP-31958 0 None None None 2025-01-18 02:22:38 UTC
Red Hat Issue Tracker OSP-33489 0 None None None 2025-01-18 02:24:02 UTC

Description Alex Stupnikov 2024-04-23 19:04:53 UTC
Description of problem:
After bug #2081254 was fixed in RHOSP 17.1 it is possible to attach ports without IP addresses to VMs. Feature itself works as expected, but Nova doesn't create consistent network_data.json for this scenario: ipless ports are not added to 'links' list.

The reason is that network_info for ipless ports contains empty list of subnets:
{"id": "24e7183c-6e96-44cb-be67-b76f93dc8a6b", "address": "fa:16:3e:3a:a6:fa", "network": {"id": "720efe1b-e34c-4cc4-b9f8-6f186f6e0443", "bridge": "br-int", "label": "internal-2", "subnets": [], "meta": {"injected": false, "tenant_id": "3ff81dd8d02b450cb7b0da6197c33a93", "mtu": 1442, "physical_network": null, "tunneled": true}}, "type": "ovs", "details": {"port_filter": true, "connectivity": "l2"}, "devname": "tap24e7183c-6e", "ovs_interfaceid": "24e7183c-6e96-44cb-be67-b76f93dc8a6b", "qbh_params": null, "qbg_params": null, "active": true, "vnic_type": "normal", "profile": {}, "preserve_on_delete": true, "delegate_create": true, "meta": {}}

As a result, netutils library skips adding such VIFs to 'links' list (empty 'subnets' -> VIF is skipped): https://github.com/openstack/nova/blob/e2ef2240b1e732b359d29457cc12abc7554fa286/nova/virt/netutils.py#L189

This is inconsistent: 'links' list contains information about L2 connection and doesn't require IP address/subnet.

Version-Release number of selected component (if applicable):
RHOSP 17.1

How reproducible:

$ openstack port create --disable-port-security --no-security-group --network external-net --fixed-ip "subnet=external-sub" port1
$ openstack port create --disable-port-security --no-security-group --network testnet --no-fixed-ip  port2
$ openstack server create --image  testimage --flavor m1.nano --port port1 --port port2 testvm1

Inside test VM:
# mount -o ro /dev/sr0 /mnt
# cat /mnt/openstack/2020-10-14/network_data.json
{"links": [{"id": "tapf3cf30db-a9", "vif_id": "f3cf30db-a9e9-40e0-9c25-d2209497256c", "type": "ovs", "mtu": null, "ethernet_mac_address": "fa:16:3e:ae:b1:40"}], "networks": [{"id": "network0", "type": "ipv4_dhcp", "link": "tapf3cf30db-a9", "network_id": "ae20fa95-cbe7-4fec-a173-dba3a2b19513"}], "services": []}

Actual results:
'links' list doesn't contain ipless ports

Expected results:
'links' list contains ipless ports


Note You need to log in before you can comment on or make changes to this bug.