PureISCSIDriver error logging not Python 2.6 compatible

Bug #1357004 reported by Victor A. Ying
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Victor A. Ying

Bug Description

PureISCSIDriver has 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 would have been caught by unit testing if the unit tests properly exercised this code path. Therefore testing of this code path should be added to test_pure.py

Changed in cinder:
assignee: nobody → Pure Storage Openstack Team (pure-storage-openstack-team)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
assignee: Pure Storage Openstack Team (pure-storage-openstack-team) → Victor A. Ying (victor-ying)
Jay Bryant (jsbryant)
Changed in cinder:
importance: Undecided → Low
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

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → juno-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: juno-3 → 2014.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.