xenapi: Fix download_handler fallback

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

Bug Description

In order to make image-download a bit more robust, we attempt to download from a preferred handler and if that fails, we fall back to a default handler.

If the preferred handler *is* the default-handler, then we should just raise the exception instead of retrying.

The existing code was checking to see with whether the handler *instance* compared as equal to the default-handler *instance*. Since the two objects are instantiated separately, they'll be different objects, so never compare as equal.

The correct check is to see if the handler is an instance of the default handler's class.

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/41201

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

Reviewed: https://review.openstack.org/41201
Committed: http://github.com/openstack/nova/commit/5fc335bbbd1f0c441740d7fc346e17fff321dad3
Submitter: Jenkins
Branch: master

commit 5fc335bbbd1f0c441740d7fc346e17fff321dad3
Author: Rick Harris <email address hidden>
Date: Fri Aug 9 21:21:22 2013 +0000

    xenapi: Fix download_handler fallback

    In order to make image-download a bit more robust, we attempt to download from
    a preferred handler and if that fails, we fall back to a default handler.

    If the preferred handler *is* the default-handler, then we should just raise
    the exception instead of retrying.

    The existing code was checking to see with whether the handler *instance*
    compared as equal to the default-handler *instance*. Since the two objects are
    instantiated separately, they'll always be different objects, so never compare
    as equal.

    The correct check is to see if the handler is an instance of the default
    handler's class.

    Fixes bug 1210659

    Change-Id: Id038d221fd2f90c36673f30d4ff8acdc8dbf098e

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