[Bug 2085154] Re: rtslib-fb-targetctl.service crashes on startup
sm8ps
2085154 at bugs.launchpad.net
Thu Apr 24 15:21:54 UTC 2025
I am facing the same error and some more. Your last comment (#4) made me
wonder. I had manually activated target.service because some tutorial I
was following at that time told me so. I remember that it had not been
automatically activated upon installation. So maybe the problem is
indeed caused by having two service files calling '/usr/bin/targetctl
restore' upon system start. That would make sense, not?
The following cases can be extracted from the syslog (ordered entries
after boot, timestamps stripped for easier readability):
1.) _Backstore already exists, Could not create Qla2xxxFabricModule, Directory not empty
Starting rtslib-fb-targetctl.service - Restore LIO kernel target configuration...
Starting target.service - Restore LIO kernel target configuration...
Could not create StorageObject S109-B: This _Backstore already exists in configFS, skipped
Could not create Target object: Could not create Qla2xxxFabricModule in configFS, skipped
Finished rtslib-fb-targetctl.service - Restore LIO kernel target configuration.
Could not create StorageObject S109-A: [Errno 39] Directory not empty: '/sys/kernel/config/target/core/iblock_0', skipped
Finished target.service - Restore LIO kernel target configuration.
2.) No saved config file, No such file or directory
Starting rtslib-fb-targetctl.service - Restore LIO kernel target configuration...
Starting target.service - Restore LIO kernel target configuration...
No saved config file at /etc/rtslib-fb-target/saveconfig.json, ok, exiting
Finished target.service - Restore LIO kernel target configuration.
Could not create StorageObject S109-A: [Errno 2] No such file or directory: '/sys/kernel/config/target/core/iblock_0/S109-A/alua', skipped
Could not find matching StorageObject for LUN 0, skipped
Could not find matching TPG LUN 0 for MappedLUN 0, skipped
Finished rtslib-fb-targetctl.service - Restore LIO kernel target configuration.
3.) UnboundLocalError: cannot access local variable 'lun_obj'
Starting rtslib-fb-targetctl.service - Restore LIO kernel target configuration...
Starting target.service - Restore LIO kernel target configuration...
Traceback (most recent call last):
File "/usr/bin/targetctl", line 82, in <module>
main()
File "/usr/bin/targetctl", line 79, in main
funcs[sys.argv[1]](savefile)
File "/usr/bin/targetctl", line 47, in restore
errors = RTSRoot().restore_from_file(restore_file=from_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/rtslib_fb/root.py", line 508, in restore_from_file
return self.restore(config, target, storage_object,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/rtslib_fb/root.py", line 442, in restore
Target.setup(fm_obj, t, err_func)
File "/usr/lib/python3/dist-packages/rtslib_fb/target.py", line 133, in setup
TPG.setup(t_obj, tpg, err_func)
File "/usr/lib/python3/dist-packages/rtslib_fb/target.py", line 427, in setup
LUN.setup(tpg_obj, lun, err_func)
File "/usr/lib/python3/dist-packages/rtslib_fb/target.py", line 686, in setup
lun_obj.alua_tg_pt_gp_name = lun['alua_tg_pt_gp_name']
^^^^^^^
UnboundLocalError: cannot access local variable 'lun_obj' where it is not associated with a value
rtslib-fb-targetctl.service: Main process exited, code=exited, status=1/FAILURE
rtslib-fb-targetctl.service: Failed with result 'exit-code'.
Failed to start rtslib-fb-targetctl.service - Restore LIO kernel target configuration.
rtslib-fb-targetctl.service: Consumed 1.168s CPU time.
Finished target.service - Restore LIO kernel target configuration.
4.) No errors
Starting rtslib-fb-targetctl.service - Restore LIO kernel target configuration...
Starting target.service - Restore LIO kernel target configuration...
No saved config file at /etc/rtslib-fb-target/saveconfig.json, ok, exiting
Finished target.service - Restore LIO kernel target configuration.
Finished rtslib-fb-targetctl.service - Restore LIO kernel target configuration.
I have not paid much attention to when what changes were done to the
configuration via targetclil so I cannot do more troubleshooting at the
moment. However, I have deactivated target.service and shall have a
close watch on the syslog for a while.
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to python-rtslib-fb in Ubuntu.
https://bugs.launchpad.net/bugs/2085154
Title:
rtslib-fb-targetctl.service crashes on startup
Status in python-rtslib-fb package in Ubuntu:
New
Bug description:
```
seb at eragon:~/TTDE/ToolChain[3]$ journalctl -b -u rtslib-fb-targetctl.service
Oct 22 07:11:09 eragon systemd[1]: Starting rtslib-fb-targetctl.service - Restore LIO kernel target configuration...
Oct 22 07:11:10 eragon target[1578]: Traceback (most recent call last):
Oct 22 07:11:10 eragon target[1578]: File "/usr/bin/targetctl", line 82, in <module>
Oct 22 07:11:10 eragon target[1578]: main()
Oct 22 07:11:10 eragon target[1578]: File "/usr/bin/targetctl", line 79, in main
Oct 22 07:11:10 eragon target[1578]: funcs[sys.argv[1]](savefile)
Oct 22 07:11:10 eragon target[1578]: File "/usr/bin/targetctl", line 47, in restore
Oct 22 07:11:10 eragon target[1578]: errors = RTSRoot().restore_from_file(restore_file=from_file)
Oct 22 07:11:10 eragon target[1578]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Oct 22 07:11:10 eragon target[1578]: File "/usr/lib/python3/dist-packages/rtslib_fb/root.py", line 508, in restore_from_file
Oct 22 07:11:10 eragon target[1578]: return self.restore(config, target, storage_object,
Oct 22 07:11:10 eragon target[1578]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Oct 22 07:11:10 eragon target[1578]: File "/usr/lib/python3/dist-packages/rtslib_fb/root.py", line 442, in restore
Oct 22 07:11:10 eragon target[1578]: Target.setup(fm_obj, t, err_func)
Oct 22 07:11:10 eragon target[1578]: File "/usr/lib/python3/dist-packages/rtslib_fb/target.py", line 133, in setup
Oct 22 07:11:10 eragon target[1578]: TPG.setup(t_obj, tpg, err_func)
Oct 22 07:11:10 eragon target[1578]: File "/usr/lib/python3/dist-packages/rtslib_fb/target.py", line 427, in setup
Oct 22 07:11:10 eragon target[1578]: LUN.setup(tpg_obj, lun, err_func)
Oct 22 07:11:10 eragon target[1578]: File "/usr/lib/python3/dist-packages/rtslib_fb/target.py", line 686, in setup
Oct 22 07:11:10 eragon target[1578]: lun_obj.alua_tg_pt_gp_name = lun['alua_tg_pt_gp_name']
Oct 22 07:11:10 eragon target[1578]: ^^^^^^^
Oct 22 07:11:10 eragon target[1578]: UnboundLocalError: cannot access local variable 'lun_obj' where it is not associated with a value
Oct 22 07:11:10 eragon systemd[1]: rtslib-fb-targetctl.service: Main process exited, code=exited, status=1/FAILURE
Oct 22 07:11:10 eragon systemd[1]: rtslib-fb-targetctl.service: Failed with result 'exit-code'.
Oct 22 07:11:10 eragon systemd[1]: Failed to start rtslib-fb-targetctl.service - Restore LIO kernel target configuration.
```
ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: python3-rtslib-fb 2.1.74-0ubuntu5
ProcVersionSignature: Ubuntu 6.8.0-47.47-generic 6.8.12
Uname: Linux 6.8.0-47-generic x86_64
ApportVersion: 2.28.1-0ubuntu3.1
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Tue Oct 22 07:30:13 2024
PackageArchitecture: all
ProcEnviron:
LANG=en_NZ.UTF-8
PATH=(custom, user)
SHELL=/bin/bash
TERM=xterm-256color
XDG_RUNTIME_DIR=<set>
SourcePackage: python-rtslib-fb
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-rtslib-fb/+bug/2085154/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list