rtslib-fb is not object compatible with rtslib

Bug #1166042 reported by James Page
30
This bug affects 5 people
Affects Status Importance Assigned to Milestone
rtslib (Ubuntu)
Fix Released
High
Unassigned
Raring
Fix Released
High
Unassigned

Bug Description

On Sun, 2013-04-07 at 13:23 +0100, Tim Eggleston wrote:
> Hi guys,
>
> I understand that this is almost certainly a downstream problem with
> the Ubuntu packages, but I wanted to see if anyone here has run into it
> before I log a bug...
>

I've already reported this to the Ubuntu folks (CC'ed), and they have
assured me that this will be addressed before the final release.

Logging a bug here would probably still be a good idea as a reference as
other Ubuntu users run into this issue.

> On Ubuntu 13.04 (packages up to date as of today), after installing
> targetcli and dependencies, on attempting to run targetcli I get the
> following error:
>
> Traceback (most recent call last):
> File "/usr/bin/targetcli", line 24, in <module>
> from targetcli import UIRoot
> File "/usr/lib/python2.7/dist-packages/targetcli/__init__.py", line
> 18, in <module>
> from ui_root import UIRoot
> File "/usr/lib/python2.7/dist-packages/targetcli/ui_root.py", line
> 24, in <module>
> from ui_target import UIFabricModule
> File "/usr/lib/python2.7/dist-packages/targetcli/ui_target.py", line
> 21, in <module>
> from ui_backstore import dedup_so_name
> File "/usr/lib/python2.7/dist-packages/targetcli/ui_backstore.py",
> line 22, in <module>
> from rtslib import FileIOBackstore, IBlockBackstore
> ImportError: cannot import name FileIOBackstore
>

So the problem is the mixing of the Fedora forked version of rtslib-fb,
and upstream targetcli codebase. rtslib-fb is *not* object library
compatible with upstream rtslib, which is what is causing the breakage
here.

Note this issue is specific to the rtslib_2.1.fb27 package in Raring,
and using the Quantal package below with the upstream rtslib version
should get you up and running again:

http://packages.ubuntu.com/source/quantal/rtslib

> This is reproducible both on a server I upgraded to 13.04, as well as
> a completely fresh build.
>
> As I say, this looks like it's probably an issue with the rtslib
> package on Ubuntu, but has anybody else seen it? Unfortunately I'm not
> competent in Python to be able to debug.
>

Thanks for reporting!

James Page (james-page)
Changed in rtslib (Ubuntu Raring):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rtslib - 2.1.fb27.isreally.2.1-0ubuntu1

---------------
rtslib (2.1.fb27.isreally.2.1-0ubuntu1) raring; urgency=low

  * Revert to original upstream source as the fork is not object
    compatible and breaks targetcli (LP: #1166042):
    - d/watch: Revert changes from 2.1.fb27-0ubuntu2.
    - d/control,copyright: Revert changes from 2.1.fb27-0ubuntu2.
    - d/python-rtslib.dirs: Revert changes from 2.1.fb27-0ubuntu2.
 -- James Page <email address hidden> Mon, 08 Apr 2013 12:55:56 +0100

Changed in rtslib (Ubuntu Raring):
status: Triaged → Fix Released
Revision history for this message
Mike Perez (thingee) wrote :

Precise seems to have the same issue as well:

precise64% dpkg -l targetcli
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=============================-=============================-==========================================================================
ii targetcli 2.0rc1-2 administration tool for managing LIO core target
precise64% dpkg -l python-rtslib
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=============================-=============================-==========================================================================
ii python-rtslib 2.1-2 LIO core target management framework - python libs
precise64% targetcli
Traceback (most recent call last):
  File "/usr/bin/targetcli", line 24, in <module>
    from targetcli import UIRoot
  File "/usr/lib/python2.7/dist-packages/targetcli/__init__.py", line 18, in <module>
    from ui_root import UIRoot
  File "/usr/lib/python2.7/dist-packages/targetcli/ui_root.py", line 24, in <module>
    from ui_target import UIFabricModule
  File "/usr/lib/python2.7/dist-packages/targetcli/ui_target.py", line 21, in <module>
    from ui_backstore import dedup_so_name
  File "/usr/lib/python2.7/dist-packages/targetcli/ui_backstore.py", line 22, in <module>
    from rtslib import FileIOBackstore, IBlockBackstore
ImportError: cannot import name FileIOBackstore

Revision history for this message
Max Lobur (max-lobur) wrote :

Reproducible in trusty
http://pastebin.com/mtTH8tMB

Revision history for this message
anubhavrakshit (anubhavrocks) wrote :

On trusty this is what i did to fix:

wget http://archive.ubuntu.com/ubuntu/pool/universe/r/rtslib/rtslib_2.2.orig.tar.gz
tar xvzf rtslib_2.2.orig.tar.gz
cd rtslib-2.2/
./setup.py build
sudo ./setup.py install

wget http://archive.ubuntu.com/ubuntu/pool/universe/t/targetcli/targetcli_3.0+git0.7e32595e.orig.tar.gz
tar xvzf targetcli_3.0+git0.7e32595e.orig.tar.gz
cd targetcli-3.0+git0.7e32595e/
./setup.py build
sudo ./setup.py install

anubhav@stargazer:~$ sudo targetcli
targetcli GIT_VERSION (rtslib 3.0.pre4.1~g1b33ceb)
Copyright (c) 2011-2014 by Datera, Inc.
All rights reserved.

/> cd backstores
/backstores> ls
o- backstores ................................................................................................................ [...]
  o- fileio .................................................................................................... [2 Storage Objects]
  | o- lun0 ...................................................................................... [/storage/lun1.img 2.0Gactivated]
  | o- lun1 ..................................................................................... [/storage/lun2.img 10.0Gactivated]
  o- iblock ..................................................................................................... [0 Storage Object]
  o- pscsi ...................................................................................................... [0 Storage Object]
  o- rd_mcp ..................................................................................................... [0 Storage Object]
/backstores>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.