Libvirt Windows Timer tests fail on a Mac

Bug #1408484 reported by Rick Harris
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Wishlist
Rick Harris

Bug Description

We have some tests that assert that the KVM timers are appropriately set for Windows.

The issue is that the test depends on the actual result of `processor.platform()` which will be `i386` on a Mac.

We need to stub the `get_arch` function out so that it always returns `arch.i686` so the test behaves consistently across platforms.

Changed in nova:
assignee: nobody → Rick Harris (rconradharris)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/145618

Joe Gordon (jogo)
Changed in nova:
importance: Undecided → Wishlist
Revision history for this message
Johannes Erdfelt (johannes.erdfelt) wrote :

I had a similar problem with platform.processor() but on Linux:

>>> import platform
>>> platform.processor()
''

My system reports an empty string for platform.processor() :(

The docs for platform.processor() states "An empty string is returned if the value cannot be determined."

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit 10acedd704f9cb5bc5ca62769c98c23fa1cbdb6f
Author: Rick Harris <email address hidden>
Date: Wed Jan 7 16:52:34 2015 -0600

    libvirt: Use arch.from_host instead of platform.processor

    The Windows timer tests would fail on a Mac because it would return `i386`
    from `get_arch` instead of one of the canonicalized architecture names.

    The solution is to use the standardized `arch.from_host` function instead.

    We still mock out the `get_arch` function so the tests pass on PPC/ARM/s390
    processors.

    Co-Authored-By: Daniel Berrange <email address hidden>
    Change-Id: Id3cd1311c91c21a50f43ea46cc8451b349fb5862
    Closes-Bug: 1408484

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