Description of problem: Export Ceph RBD via LIO Cannot execute ls once a block device is created in targetcli. Version-Release number of selected component (if applicable): targetcli-2.1.fb26-2.fc19.noarch ceph-0.61.7-0.fc19.x86_64 kernel-3.10.3-300.fc19.x86_64 How reproducible: Steps to Reproduce: [root@cephgw ~]# rbd showmapped id pool image snap device 1 iscsi-ssd test-ssd - /dev/rbd1 [root@cephgw ~]# targetcli targetcli shell version 2.1.26 Copyright 2011 by RisingTide Systems LLC and others. For help on commands, type 'help'. /> ls o- / ......................................................................................................................... [...] o- backstores .............................................................................................................. [...] | o- block .................................................................................................. [Storage Objects: 0] | o- fileio ................................................................................................. [Storage Objects: 0] | o- pscsi .................................................................................................. [Storage Objects: 0] | o- ramdisk ................................................................................................ [Storage Objects: 0] o- iscsi ............................................................................................................ [Targets: 0] o- loopback ......................................................................................................... [Targets: 0] o- vhost ............................................................................................................ [Targets: 0] /> cd backstores /backstores> dc block Command not found dc /backstores> cd block /backstores/block> create name=bashfulssd dev=/dev/rbd1 Created block storage object bashfulssd using /dev/rbd1. /backstores/block> ls Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/configshell/shell.py", line 990, in run_interactive self._cli_loop() File "/usr/lib/python2.7/site-packages/configshell/shell.py", line 813, in _cli_loop self.run_cmdline(cmdline) File "/usr/lib/python2.7/site-packages/configshell/shell.py", line 934, in run_cmdline self._execute_command(path, command, pparams, kparams) File "/usr/lib/python2.7/site-packages/configshell/shell.py", line 909, 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 1416, in execute_command result = method(*pparams, **kparams) File "/usr/lib/python2.7/site-packages/configshell/node.py", line 714, in ui_command_ls tree = self._render_tree(target, depth=depth) File "/usr/lib/python2.7/site-packages/configshell/node.py", line 865, in _render_tree + self._render_tree(children[i], margin, depth) File "/usr/lib/python2.7/site-packages/configshell/node.py", line 769, in _render_tree (description, is_healthy) = root.summary() File "/usr/lib/python2.7/site-packages/targetcli/ui_backstore.py", line 423, in summary return ("%s (%s) %s%s %s" % (so.udev_path, bytes_to_human(so.size), File "/usr/lib/python2.7/site-packages/rtslib/tcm.py", line 707, in _get_size return get_blockdev_size(self._parse_info('device')) * int(self._parse_info('SectorSize')) File "/usr/lib/python2.7/site-packages/rtslib/utils.py", line 122, in get_blockdev_size return int(fread("/sys/block/%s/%s/size" % (m.groups()[0], m.group()))) File "/usr/lib/python2.7/site-packages/rtslib/utils.py", line 88, in fread with open(path, 'r') as file_fd: IOError: [Errno 2] No such file or directory: '/sys/block/rbd/rbd1/size' /backstores/block> delete name=bashfulssd Deleted storage object bashfulssd. /backstores/block> exit Global pref auto_save_on_exit=true Last 10 configs saved in /etc/target/backup. Configuration saved to /etc/target/saveconfig.json 1. 2. 3. Actual results: There is no /sys/block/rbd/rbd1/size, actual is /sys/block/rbd1/size Expected results: No python errors in targetcli Additional info:
Should be fixed by python-rtslib-2.1.fb37-1, which is in updates-testing now if you'd like to try it now.