tgt driver does not handle file open/read errors correctly
Bug #1422095 reported by
Anish Bhatt
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 |
summary: |
- tgt driver does not handle file open errors correctly + tgt driver does not handle file open/read errors correctly |
Changed in cinder: | |
milestone: | none → kilo-3 |
status: | Fix Committed → Fix Released |
Changed in cinder: | |
milestone: | kilo-3 → 2015.1.0 |
To post a comment you must log in.
Reviewed: https:/ /review. openstack. org/154713 /git.openstack. org/cgit/ openstack/ cinder/ commit/ ?id=ad08c7a1f0c 4e6a1e44b5ad02f 9efbf86a2a878e
Committed: https:/
Submitter: Jenkins
Branch: master
commit ad08c7a1f0c4e6a 1e44b5ad02f9efb f86a2a878e
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 38860b31cae1b44 4527e998869
Change-Id: I8a8f1ee561b15b