network_data in metadata service not the same with network_data from configdrive when set ironic portgroup

Bug #1940894 reported by jiangshankun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Confirmed
Undecided
Unassigned

Bug Description

When i use nova to boot a ironic instance and use portgroup to make nic bonds,I found network_data in metadata service is not the same with network_data from configdrive.

Cloud-init can only use the network_data from configdrive to make nic bonds.

I think the network_data.json from metadata and network_data.json from configdrive should be the same.

network_data from metadata service

{
 "link": [{
   "id": "tap9997f2061-e3",
   "vif_id": "997f2062-e352-410e-b7d4-1f63cc1b01ee",
   "type": "phy",
   "mtu": "1500",
   "ethernet_mac_address": "b4:05:5d:15:f9:3e"
  }
 ],
 "networks": [{
   "id": "network0",
   "type": "ipv6_dhcp",
   "link": "tap9997f2061-e3",
   "network_id": "27c2c6b3-d6eb-4c8d-8ae4-f630a218748d",
  }
 ],
 "services": []
}

network_data from configdrive
{
 "link": [{
   "id": "tap9997f2061-e3",
   "vif_id": "997f2062-e352-410e-b7d4-1f63cc1b01ee",
   "type": "bond",
   "mtu": "1500",
   "ethernet_mac_address": "b4:05:5d:15:f9:3e",
   "bond_mode": "802.3ad",
   "bond_links": ["038f035a-31ca-488e-abfb-24c45c25920e", "32da47cc-ddee-4987-9ea7-682a0d8369aa"],
   "bond_miimon": 100
  }, {
   "id": "038f035a-31ca-488e-abfb-24c45c25920e",
   "type": "phy",
   "ethernet_mac_address": "b4:05:5d:15:f9:3e"
  }, {
   "id": "32da47cc-ddee-4987-9ea7-682a0d8369aa",
   "type": "phy",
   "ethernet_mac_address": "b4:05:5d:15:f9:3f"
  }
 ],
 "networks": [{
   "id": "network0",
   "type": "ipv6_dhcp",
   "link": "tap9997f2061-e3",
   "network_id": "27c2c6b3-d6eb-4c8d-8ae4-f630a218748d",
  }
 ],
 "services": []
}

Revision history for this message
jiangshankun (narcissujsk) wrote :
tags: added: nova
tags: added: ironic metadata
Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

Ironic virt driver generates the config driver here [1] with the networking metadata specific for ironic including the bonding. When the nova-metadata service gathers the metadata for an instance it calls the virt driver agnostic nova.virt.netutils.get_network_metadata()[2] that does not contain any virt driver specific information.

This causing the discrepancy between the content of the config driver and the content of the metadata service.

I'm not sure it is easy to fix but worth a discussion.

[1] https://github.com/openstack/nova/blob/c37a4656bbbf6fca169fb1456912a5020f911698/nova/virt/ironic/driver.py#L1076
[2] https://github.com/openstack/nova/blob/c37a4656bbbf6fca169fb1456912a5020f911698/nova/virt/netutils.py#L168

Changed in nova:
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.