cloud-init Unknown network_data link type: macvtap

Bug #1639263 reported by Greg Keuken on 2016-11-04
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Undecided
Dan Watkins

Bug Description

Cloud Init failing due to unknown network data link type: macvtap

Sample cloud_init.log output of launched instance where compute running neutron-macvtap-agent

[CLOUDINIT] util.py[WARNING]: failed stage init-local
[CLOUDINIT] util.py[DEBUG]: failed stage init-local#012Traceback (most recent call last):#012 File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 521, in status_wrapper#012 ret = functor(name, args)#012 File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 280, in main_init#012 init.apply_network_config(bring_up=bool(mode != sources.DSMODE_LOCAL))#012 File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 631, in apply_network_config#012 netcfg, src = self._find_networking_config()#012 File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 618, in _find_networking_config#012 if self.datasource and hasattr(self.datasource, 'network_config'):#012 File "/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceConfigDrive.py", line 159, in network_config#012 self.network_json, known_macs=self.known_macs)#012 File "/usr/lib/python3/dist-packages/cloudinit/sources/helpers/openstack.py", line 627, in convert_net_json#012 'Unknown network_data link type: %s' % link['type'])#012ValueError: Unknown network_data link type: macvtap

Related branches

Dan Watkins (daniel-thewatkins) wrote :

Hi Greg,

Sorry we haven't go to this before, but we are doing bug triage now. Is this still an issue you're seeing?

Thanks!

Changed in cloud-init:
status: New → Incomplete
Greg Keuken (gkeuken) wrote :

Hello,

Yes .. this was reported in 16.04 and the same bug was experienced in 18.04 as well.

My workaround was simply to add macvtap to the acceptable types in:
/usr/lib/python3/dist-packages/cloudinit/sources/helpers/openstack.py

Changed in cloud-init:
status: Incomplete → Confirmed
Changed in cloud-init:
status: Confirmed → Triaged
Changed in cloud-init:
status: Triaged → In Progress
assignee: nobody → Dan Watkins (daniel-thewatkins)
Dan Watkins (daniel-thewatkins) wrote :

Instead of my initial plan to just add macvtap to the list (as suggested by Greg), we are planning to modify the behaviour of the OpenStack datasource to assume that any device types that it doesn't otherwise know about are physical devices, but log a warning when we see a type that isn't known to be an OpenStack physical type. This should unblock people who are hitting this issue (whilst warning them that they have an unusual-looking OpenStack configuration), without us _having_ to expand this list every time a new type is seen in the wild.

Dan Watkins (daniel-thewatkins) wrote :

Greg,

I'm looking at writing a test to make sure that we don't regress this; could you run `cloud-init collect-logs` on a failing instance and attach the output to this bug? That will allow me to write a test using real-world data.

Thanks!

Dan Watkins (daniel-thewatkins) wrote :

My mistake, collect-logs doesn't include the necessary data for this bug in case it contains sensitive user data. Please grab /run/cloud-init/instance-data.json from a failing instance, check that you're happy having the data therein public, and attach it to the bug.

Thanks!

Greg Keuken (gkeuken) wrote :

Hello,

I've moved on to a different job role/area so I no longer have appropriate access to perform the above mentioned work in the Openstack environment. I will pass along this info to the person who has taken over my past responsibilities so that they may provide the input.

Dan Watkins (daniel-thewatkins) wrote :

Thanks Greg! I think we can probably synthesise something that'll work fine, so if it's too much trouble don't worry about it.

This bug is fixed with commit 5352dd99 to cloud-init on branch master.
To view that commit see the following URL:
https://git.launchpad.net/cloud-init/commit/?id=5352dd99

Changed in cloud-init:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers