Bug 1149174
| Summary: | targetcli failed to create block backstore | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Bruno Goncalves <bgoncalv> |
| Component: | python-rtslib | Assignee: | Andy Grover <agrover> |
| Status: | CLOSED ERRATA | QA Contact: | Bruno Goncalves <bgoncalv> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.1 | CC: | agrover, cleech, smitterl |
| Target Milestone: | rc | Keywords: | Regression |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-03-05 13:31:22 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1151188 | ||
| Bug Blocks: | 1129387 | ||
Setting it as regression as using RHEL-7.0 kernel it works. kernel-3.10.0-123.el7 The regression seems to have been inserted by BZ#1129387. It works on kernel-3.10.0-161.el7, but it fails on kernel-3.10.0-161.el7. Sorry, I meant to say it works on kernel -160. This backported patch in the kernel: target: Don't allow setting WC emulation if device doesn't support caused a bug in python-rtslib to manifest. So no changes for kernel, we just need to update python-rtslib. a workaround for now is to add "write_back=false" to the create command, e.g.: targetcli /backstores/block create target1-tpg1-lun1 /dev/loop0 write_back=false Problem has been fixed on python-rtslib-2.1.fb50-1.el7.noarch. # rpm -q targetcli targetcli-2.1.fb34-1.el7.noarch 3.10.0-175.el7 # targetcli /backstores/block create target1-tpg1-lun1 /dev/loop0 Created block storage object target1-tpg1-lun1 using /dev/loop0. # targetcli ls o- / ......................................................................................................................... [...] o- backstores .............................................................................................................. [...] | o- block .................................................................................................. [Storage Objects: 1] | | o- target1-tpg1-lun1 ......................................................... [/dev/loop0 (1000.0MiB) write-thru deactivated] | o- fileio ................................................................................................. [Storage Objects: 0] | o- pscsi .................................................................................................. [Storage Objects: 0] | o- ramdisk ................................................................................................ [Storage Objects: 0] o- iscsi ............................................................................................................ [Targets: 0] o- loopback ......................................................................................................... [Targets: 0] *** Bug 1172715 has been marked as a duplicate of this bug. *** Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-0581.html |
Description of problem: Traceback when trying to create a block backtore device Version-Release number of selected component (if applicable): kernel-3.10.0-175.el7 How reproducible: 100% Steps to Reproduce: 1.Try to device the backstore device being a loop device. # dd if=/dev/zero of=/test.img count=1000 bs=1M # losetup /dev/loop0 /test.img # targetcli /backstores/block create target1-tpg1-lun1 /dev/loop0 Traceback (most recent call last): File "/usr/bin/targetcli", line 89, in <module> main() File "/usr/bin/targetcli", line 72, in main shell.run_cmdline(" ".join(sys.argv[1:])) File "/usr/lib/python2.7/site-packages/configshell/shell.py", line 891, in run_cmdline self._execute_command(path, command, pparams, kparams) File "/usr/lib/python2.7/site-packages/configshell/shell.py", line 866, in _execute_command result = target.execute_command(command, pparams, kparams) File "/usr/lib/python2.7/site-packages/targetcli/ui_node.py", line 87, in execute_command pparams, kparams) File "/usr/lib/python2.7/site-packages/configshell/node.py", line 1417, in execute_command result = method(*pparams, **kparams) File "/usr/lib/python2.7/site-packages/targetcli/ui_backstore.py", line 387, in ui_command_create so = BlockStorageObject(name, dev, readonly=readonly, write_back=write_back) File "/usr/lib/python2.7/site-packages/rtslib/tcm.py", line 676, in __init__ raise TypeError: exceptions must be old-style classes or derived from BaseException, not NoneType Actual results: Expected results: Additional info: # fdisk -l /dev/loop0 Disk /dev/loop0: 1048 MB, 1048576000 bytes, 2048000 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes