← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2118400] [NEW] Nova metadata service doesn't process ipless ports properly

 

Public bug reported:

After bug #2081254 was fixed in Wallaby 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.


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
Unknown macro: {"links"}
Actual results:
'links' list doesn't contain ipless ports

Expected results:
'links' list contains ipless ports

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: metadata network

** Tags added: network

** Tags added: metadata

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/2118400

Title:
  Nova metadata service doesn't process ipless ports properly

Status in OpenStack Compute (nova):
  New

Bug description:
  After bug #2081254 was fixed in Wallaby 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.

  
  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
  Unknown macro: {"links"}
  Actual results:
  'links' list doesn't contain ipless ports

  Expected results:
  'links' list contains ipless ports

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/2118400/+subscriptions