Traceback in dynamic metadata driver: unexpected keyword argument 'extra_md'

Bug #1607395 reported by Rob Crittenden
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Incomplete
Undecided
Unassigned

Bug Description

Using new dynamic metadata driver fails with a traceback:

ERROR nova.api.metadata.handler [req-d4df1623-dc4a-4e9c-b129-1e5dd76c59ac None None] Failed to get metadata for IP 10.0.0.3
TRACE nova.api.metadata.handler Traceback (most recent call last):
TRACE nova.api.metadata.handler File "/home/stack/openstack/nova/nova/api/metadata/handler.py", line 134, in _handle_remote_ip_request
TRACE nova.api.metadata.handler meta_data = self.get_metadata_by_remote_address(remote_address)
TRACE nova.api.metadata.handler File "/home/stack/openstack/nova/nova/api/metadata/handler.py", line 61, in get_metadata_by_remote_address
TRACE nova.api.metadata.handler data = base.get_metadata_by_address(address)
TRACE nova.api.metadata.handler File "/home/stack/openstack/nova/nova/api/metadata/base.py", line 660, in get_metadata_by_address
TRACE nova.api.metadata.handler ctxt)
TRACE nova.api.metadata.handler File "/home/stack/openstack/nova/nova/api/metadata/base.py", line 670, in get_metadata_by_instance_id
TRACE nova.api.metadata.handler return InstanceMetadata(instance, address)
TRACE nova.api.metadata.handler File "/home/stack/openstack/nova/nova/api/metadata/base.py", line 195, in __init__
TRACE nova.api.metadata.handler extra_md=extra_md, network_info=network_info)
TRACE nova.api.metadata.handler TypeError: __init__() got an unexpected keyword argument 'extra_md'

This is the configuration:

vendordata_providers = StaticJSON, DynamicJSON
vendordata_dynamic_targets = 'join@http://127.0.0.1:9999/v1/'
vendordata_driver = nova.api.metadata.vendordata_dynamic.DynamicVendorData
vendordata_dynamic_connect_timeout = 5
vendordata_dynamic_read_timeout = 30
vendordata_jsonfile_path = /etc/nova/cloud-config.json

Tags: api
Revision history for this message
Sean Dague (sdague) wrote :

What githash are you on here? Is there an easy way to replicate this?

Changed in nova:
status: New → Incomplete
Revision history for this message
Sean Dague (sdague) wrote :

Oh...

Can you fully remove vendordata_driver config option. I think that because you are doing that you are bypassing the expected code path, and that would explain why this is exploding.

Changed in nova:
milestone: none → newton-3
tags: added: api
Revision history for this message
Rob Crittenden (rcritten) wrote :

Confirmed that if I comment-out the vendordata_driver then it works.

I'm using ddebd1011280f000024693bad2a65656417f441b, merged cleanly into a slightly older nova.

So should vendordata_driver be dropped as a configuration option?

Revision history for this message
Michael Still (mikal) wrote :

Sorry, only just saw this (in transit, etc). I'll take a look today.

Revision history for this message
Michael Still (mikal) wrote :

So, this code is a bit horrible to read, so a clarifying question -- are you specifying a value for vendordata_driver? If so, what?

I don't think we can remove vendordata_driver just yet, because its in the deprecation period and should continue to work for some sort of transition period. I'm now wondering if I've inadvertently broken it. If we can find a smoking gun I should add a functional test to ensure that we don't break this until its removed completely.

Revision history for this message
Rob Crittenden (rcritten) wrote :

I was specifying it as:

vendordata_driver = nova.api.metadata.vendordata_dynamic.DynamicVendorData

Revision history for this message
Michael Still (mikal) wrote :

Ahh, I see. So, don't do that. You specify the new driver like this:

    vendordata_providers=DynamicJson

That sounds like something I can fix with documentation, which I whip up now.

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.