tgt driver does not handle file open/read errors correctly

Bug #1422095 reported by Anish Bhatt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Anish Bhatt

Bug Description

Current logic in tgt driver tries to reuse chap credentials from an existing target config file when possible. If target config does not exist, it falls back to creating new chap credentials.

The correct condition for this case should be file not found, however currently all open/read errors are just allowed to fall through, assuming error is always IOError when really exception/error return should be checked as IOError & errno=2 (tgt is linux only)

Changed in cinder:
assignee: nobody → Anish Bhatt (anish7)
status: New → In Progress
Anish Bhatt (anish7)
summary: - tgt driver does not handle file open errors correctly
+ tgt driver does not handle file open/read errors correctly
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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

commit ad08c7a1f0c4e6a1e44b5ad02f9efbf86a2a878e
Author: Anish Bhatt <email address hidden>
Date: Tue Feb 10 15:59:04 2015 -0800

    Improve error handling in refactored Tgt driver

    Only allow IOError to fall through when file not found is
    acceptable. Cleanup a few error messages, remove uses of six as
    this is not required

    Closes-Bug: 1422095
    Change-Id: I8a8f1ee561b15b38860b31cae1b444527e998869

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