Package Details: targetcli-fb 2.1.50-1

Git Clone URL: https://aur.archlinux.org/targetcli-fb.git (read-only, click to copy)
Package Base: targetcli-fb
Description: free branch of the targetcli LIO administration shell (iSCSI + Co)
Upstream URL: https://github.com/open-iscsi/targetcli-fb
Licenses: Apache
Provides: targetcli
Submitter: JonnyJD
Maintainer: mikesd
Last Packager: mikesd
Votes: 12
Popularity: 0.030821
First Submitted: 2012-02-27 01:05
Last Updated: 2019-09-23 10:19

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 Next › Last »

JonnyJD commented on 2014-04-23 13:26

One problem would be if you had a custom kernel with configfs (CONFIG_CONFIGFS_FS) either built as a module and not having the module available for the currently running kernel or you disabled it altogether.
Either way: You need configfs for LIO to work.

I am no kernel expert, but I don't know why else `modprobe configfs` would fail, except for not using su/sudo.

JonnyJD commented on 2014-04-23 13:09

First of all: You don't need kmod. There is a python module with that name: https://github.com/agrover/python-kmod but that is completely optional.
The ImportError is catched and running modprobe is then tried by rtslib.

Running modprobe is what gave the error and the ImportError is only part of the Trace, not the actual problem.

What failed is `modprobe configfs`.
The question is now why that failed. "configfs" is nothing that shows up in "lsmod" since this should be built into the kernel on Arch (CONFIG_CONFIGFS_FS=y)
What should show up is a file system that shows up with `mount` (after it is mounted):
configfs on /sys/kernel/config type configfs (rw,relatime)

Does `modprobe -v configfs` show any error messages?
Does configfs appear mounted (`mount`)?
Anything regarding this showing up in /var/log/messages?

I am not completely up to date on my machine. Maybe there is some problem with some kernel version.
Does a restart help? What kernel version do you have installed?

I don't think it has to do with the actual upgrade (as in the current versions of targetcli/rtslib) but possibly with the "overall" state of the system or kernel.

ad1x commented on 2014-04-23 12:35

After an upgrade I rebuild and upgraded python-configshell-fb, python-rtslib-fb and targetcli-fb (in that order).

Now targetcli.service fails with:

target.service - Restore LIO kernel target configuration
Loaded: loaded (/usr/lib/systemd/system/target.service; enabled)
Active: failed (Result: exit-code) since Wed 2014-04-23 14:25:13 CEST; 8s ago
Process: 20346 ExecStart=/usr/bin/targetctl restore (code=exited, status=1/FAILURE)
Main PID: 20346 (code=exited, status=1/FAILURE)

Apr 23 14:25:13 srv target[20346]: File "/usr/bin/targetctl", line 47, in restore
Apr 23 14:25:13 srv target[20346]: errors = RTSRoot().restore_from_file(restore_file=from_file)
Apr 23 14:25:13 srv target[20346]: File "/usr/lib/python3.4/site-packages/rtslib/root.py", line 73, in __init__
Apr 23 14:25:13 srv target[20346]: modprobe('configfs')
Apr 23 14:25:13 srv target[20346]: File "/usr/lib/python3.4/site-packages/rtslib/utils.py", line 370, in modprobe
Apr 23 14:25:13 srv target[20346]: raise RTSLibError(stderrdata)
Apr 23 14:25:13 srv target[20346]: rtslib.utils.RTSLibError: b''
Apr 23 14:25:13 srv systemd[1]: target.service: main process exited, code=exited, status=1/FAILURE
Apr 23 14:25:13 srv systemd[1]: Failed to start Restore LIO kernel target configuration.
Apr 23 14:25:13 srv systemd[1]: Unit target.service entered failed state.

Trying to get into targetcli yields:

Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/rtslib/utils.py", line 362, in modprobe
import kmod
ImportError: No module named 'kmod'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/bin/targetcli", line 100, in <module>
main()
File "/usr/bin/targetcli", line 63, in main
root_node = UIRoot(shell, as_root=is_root)
File "/usr/lib/python3.4/site-packages/targetcli/ui_root.py", line 44, in __init__
self.rtsroot = RTSRoot()
File "/usr/lib/python3.4/site-packages/rtslib/root.py", line 73, in __init__
modprobe('configfs')
File "/usr/lib/python3.4/site-packages/rtslib/utils.py", line 370, in modprobe
raise RTSLibError(stderrdata)
rtslib.utils.RTSLibError: b''

I guess I'm missing kmod, but I don't know where to get it from :(

TheImperial2004 commented on 2014-03-30 23:45

That did the trick .

Thanks a lot Jonny!

JonnyJD commented on 2014-03-30 23:37

Just a guess:

You have one of targetcli/rtslib installed with Python 3.3 and one with Python 3.4. So you need to rebuild one.

TheImperial2004 commented on 2014-03-30 21:45

Hello Jonny

A recent full system upgrade results in target.service failure :

Mar 31 00:42:45 srv1 target[1012]: Traceback (most recent call last):
Mar 31 00:42:45 srv1 target[1012]: File "/usr/bin/targetctl", line 27, in <module>
Mar 31 00:42:45 srv1 target[1012]: from rtslib import RTSRoot
Mar 31 00:42:45 srv1 target[1012]: ImportError: No module named 'rtslib'
Mar 31 00:42:45 srv1 systemd[1]: target.service: main process exited, code=exited, status=1/FAILURE
Mar 31 00:42:45 srv1 systemd[1]: Failed to start Restore LIO kernel target configuration.
Mar 31 00:42:45 srv1 systemd[1]: Unit target.service entered failed state.

Thank you for your efforts .

JonnyJD commented on 2014-03-11 11:45

Hm, I don't really know actually.

Well, I do know that the original targetcli uses lio-utils to save the configuration in *.py files in /etc, which are basically just a list of lio-utils commands which are meant to be executed, not "read/parsed".
Targetcli-fb/rtslib-fb read and write json files.

Both formats are human-readable and you are supposed to be able to edit the json files by hand. There is a manpage "saveconfig.json.5" created when building rtslib-fb. Here if you don't have that at hand: download https://raw.github.com/agrover/rtslib-fb/master/doc/saveconfig.json.5 and open it with "man ./saveconfig.json.5".

One way would be to have a look at the /etc/*.py and/or start lio-utils/original targetcli and list the configuration there.
Then try to re-create this configuration with targetcli-fb and adjust the json manually for ids/strings that are "off".

I forwarded your request upstream, maybe there will be a nice idea about upgrading there:
https://github.com/agrover/targetcli-fb/issues/38

andyshinn commented on 2014-03-11 05:39

I was reading the wiki for setting up iSCSI and noticed: "The original targetcli is also available but has a different way of saving the configuration...". Does this mean that a configuration started on targetcli should not be upgraded to targetcli-fb? Is there an upgrade path?

JonnyJD commented on 2014-03-02 09:30

@mgmartin:
Thanks a lot for reporting. That issue must have been existing since ages.

This is fixed in a new pkgrel of python-rtslib-fb (where /etc/target is also created and the service file "lives"):
https://aur.archlinux.org/packages/python-rtslib-fb/

Anonymous comment on 2014-03-02 00:48

Thanks for the package, it's working very well.

I had to manually mkdir /etc/target/backup in order for the auto config backups to work, but no other problems.