Comment 12 for bug 1865037

Revision history for this message
Billy Olsen (billy-olsen) wrote :

This bug is also a problem on focal. When trying to install in a container, the service fails to start with:

invoke-rc.d: initscript rtslib-fb-targetctl, action "start" failed.
● rtslib-fb-targetctl.service - Restore LIO kernel target configuration
     Loaded: loaded (/lib/systemd/system/rtslib-fb-targetctl.service; disabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2021-06-24 18:08:27 UTC; 13ms ago
    Process: 1232 ExecStart=/usr/bin/mkdir -p /etc/rtslib-fb-target (code=exited, status=0/SUCCESS)
    Process: 1233 ExecStart=/usr/bin/targetctl restore (code=exited, status=1/FAILURE)
   Main PID: 1233 (code=exited, status=1/FAILURE)

Jun 24 18:08:27 closing-anemone target[1233]: File "/usr/bin/targetctl", line 47, in restore
Jun 24 18:08:27 closing-anemone target[1233]: errors = RTSRoot().restore_from_file(restore_file=from_file)
Jun 24 18:08:27 closing-anemone target[1233]: File "/usr/lib/python3/dist-packages/rtslib_fb/root.py", line 85, in __init__
Jun 24 18:08:27 closing-anemone target[1233]: modprobe('target_core_mod')
Jun 24 18:08:27 closing-anemone target[1233]: File "/usr/lib/python3/dist-packages/rtslib_fb/utils.py", line 428, in modprobe
Jun 24 18:08:27 closing-anemone target[1233]: raise RTSLibError(stderrdata)
Jun 24 18:08:27 closing-anemone target[1233]: rtslib_fb.utils.RTSLibError: b'modprobe: FATAL: Module target_core_mod not found in directory /lib/modules/5.8.0-55-generic\n'
Jun 24 18:08:27 closing-anemone systemd[1]: rtslib-fb-targetctl.service: Main process exited, code=exited, status=1/FAILURE
Jun 24 18:08:27 closing-anemone systemd[1]: rtslib-fb-targetctl.service: Failed with result 'exit-code'.
Jun 24 18:08:27 closing-anemone systemd[1]: Failed to start Restore LIO kernel target configuration.
dpkg: error processing package python3-rtslib-fb (--configure):
 installed python3-rtslib-fb package post-installation script subprocess returned error exit status 1
Processing triggers for systemd (2dmesg: read kernel buffer failed: Operation not permitted

I can confirm that the ConditionVirtualization=!container directive added to the service file addresses the issue.