ComputeCapabilitiesFilter fail because cpu_info is loaded as unicode

Bug #1331176 reported by Facundo Maldonado
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Pawel Koniszewski

Bug Description

cpu_info data is loaded as unicode in HostState.
ComputeCapabilitiesFilter fails to get attributes from this property.

This will fail:
    capabilities:cpu_info:features <in> aes
    capabilities:cpu_info:vendor = Intel

while this will pass
   capabilities:hypervisor_type = QEMU
   hypervisor_type = QEMU

Revision history for this message
Facundo Maldonado (facundo-n-maldonado) wrote :
Changed in nova:
assignee: nobody → Facundo Maldonado (facundo-n-maldonado)
Changed in nova:
status: New → In Progress
summary: - ComputeCapabilitiesFilter because cpu_info is loaded as unicode
+ ComputeCapabilitiesFilter fail because cpu_info is loaded as unicode
Revision history for this message
Facundo Maldonado (facundo-n-maldonado) wrote :
Changed in nova:
assignee: Facundo Maldonado (facundo-n-maldonado) → Pawel Koniszewski (pawel-koniszewski)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/89844
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=eeeb5830e3ddadcc3f662ef3512f16af0ec1cac4
Submitter: Jenkins
Branch: master

commit eeeb5830e3ddadcc3f662ef3512f16af0ec1cac4
Author: Pawel Koniszewski <email address hidden>
Date: Wed Jul 30 09:10:09 2014 -0400

    Parse unicode cpu_info as json before using it

    If the extra specs are some of this:
    - (capabilities:cpu_info:vendor, Intel)
    - (capabilities:cpu_info:topology:cores, 2)
    - (capabilities:cpu_info:features, <in> rdtscp)

    It doesn't work because the cpu_info is loaded as unicode in HostState.
    The patch fix these cases by parsing the cpu_info to dict.
    Update: use six.string_types instead of unicode.

    Change-Id: Ieabf95b1e3e5893ced16c0571c29b13b252df5d1
    Closes-Bug: #1331176
    Co-Authored-By: Pawel Koniszewski <email address hidden>

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-3 → 2014.2
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.