Comment 2 for bug 1210659

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