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.
Reviewed: https:/ /review. openstack. org/41201 github. com/openstack/ nova/commit/ 5fc335bbbd1f0c4 41740d7fc346e17 fff321dad3
Committed: http://
Submitter: Jenkins
Branch: master
commit 5fc335bbbd1f0c4 41740d7fc346e17 fff321dad3
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: Id038d221fd2f90 c36673f30d4ff8a cdc8dbf098e