Re: Issue with Targetcli -- Python error - F20

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andy,

Just had a quick look at this...

Was that only an issue with the fb-specific object caching? A quick glance at your patch suggests so, but I still do not like the way the exception (did not) bubbled up. I'll change that in my next cycle I guess, WDYT - do you plan on improving that on your side?

Best,
--
Jerome Martin

On 06/20/2014 08:22 PM, Andy Grover wrote:
On 06/20/2014 11:00 AM, Christophe Vu-Brugier wrote:
Hi,

On Thu, 19 Jun 2014 17:12:51 -0400, deeepdish wrote :
I'm trying to create a block backstore in targetcli on a newly
installed Fedora 20 system.

I can confirm this is working on another Fedora 20 system (installed
about a month ago), and am wondering if there's an update somewhere
that may be impacting targetcli.

Here's what I'm attempting:

[root@bl05ssn09 ~]# lvcreate -n TEST -L 1G data
   Logical volume "TEST" created
[root@bl05ssn09 ~]# targetcli
targetcli shell version 2.1.fb35
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.

/backstores/block> create name=test dev=/dev/data/TEST
Traceback (most recent call last):
   File "/usr/bin/targetcli", line 100, in <module>
     main()
   File "/usr/bin/targetcli", line 90, in main
     shell.run_interactive()
   File "/usr/lib/python2.7/site-packages/configshell/shell.py", line
948, in run_interactive
     self._cli_loop()
   File "/usr/lib/python2.7/site-packages/configshell/shell.py", line
777, in _cli_loop
     self.run_cmdline(cmdline)
   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/configshell/node.py", line
1413, in execute_command
     return 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 677, in
__init__ raise
TypeError: exceptions must be old-style classes or derived from
BaseException, not NoneType

[root@bl05ssn09 ~]# targetcli /backstores/block create name=test
dev=/dev/data/TEST
exceptions must be old-style classes or derived from BaseException,
not NoneType
[root@bl05ssn09 ~]#

I managed to reproduce your bug on a Fedora 20 with a 3.14 kernel
(3.14.6-200.fc20.x86_64). The exception happens in the following part
of tcm.py:

At line 694 in BlockStorageObject._configure():

   if write_back:
       self.set_attribute("emulate_write_cache", 1)

The set_attribute() method fails because of a permission denied error.

As a workaround, you can comment out the two instructions in the
following file :

   /usr/lib/python2.7/site-packages/rtslib/tcm.py

Best regards,

Thanks for diagnosing the issue!

This actually is fixed in rtslib-fb git repo, but hasn't been tagged
into a release. I'll go ahead and do that.

Thanks again -- Regards -- Andy
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux