Comment 2 for bug 1357004

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

Reviewed: https://review.openstack.org/114382
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=be0cee3b95e875788cfc5561837cff766ca87bc7
Submitter: Jenkins
Branch: master

commit be0cee3b95e875788cfc5561837cff766ca87bc7
Author: Victor A. Ying <email address hidden>
Date: Thu Aug 14 15:03:58 2014 -0700

    Fix exception handling in PureISCSIDriver

    PureISCSIDriver had some error logging messages that make use of empty
    replacement fields "{}" in strings on which the .format() method is
    called, as allowed in Python 2.7+. Python 2.6 requires explicitly
    naming or enumerating fields, i.e., "{}" must be replaced with "{0}".
    This change fixes this so PureISCSIDriver is Python 2.6 compatible.

    PureISCSIDriver.terminate_connection() also changed to catch
    errors raised by _get_host_name(). Exception handling generally changed
    to be more correct.

    This change also adds testing of these code path to the unit tests,
    to make sure it's actually correct.

    Change-Id: I84179a8bc59dcf5593664ab11c90b07c451fd360
    Closes-Bug: 1357004