Comment 1 for bug 1366859

Revision history for this message
Daniel Berrange (berrange) wrote : Re: extra_spec requirement 'amd64' does not match 'x86_64'

Ah, so when returning a dict from get_available_resources, the Ironic driver is reporting the compute host architecture in two places

 - The 'supported_instances' list ( [[<arch>, <vmmode>, <hvtype>]])
 - The 'cpu_arch' extra specs field

Then the filter is matching on the extra specs field.

The canonicalization of architecture and back compat workarounds I put in place were only targetting the 'supported_instances' list information.

The failure you're reporting here is because we canonicalized the data put into the extra spec, but don't canonicalize the data when checking it in the ComputeCapabilitiesFilter

I don't know much about Ironic, but I'm curious as to why it is reporting a cpu_arch extra specs field at all, given that we already have a well specified way to report the architecture via the 'supported_instances' list and the ImagePropertiesFilter filter which AFAICT should serve the same purpose.

So I can see 3 possible fixes here, in order of my preference

 - Remove the cpu_arch extra_specs entirely and just use ImagePropertiesFilter instead
 - Stop canonicalizing the data in the 'cpu_arch' extra specs field (but *still* canonicalize supported_instances)
 - Add hack to ComputeCapabilitiesFilter to canonicalize match data when looking at 'cpu_arch' extra_spec