It seems like the TGT bug (when stopping, reloading or restarting the TGT deamon) is solved in Ubuntu Artful (17.10). I did not make tests, but now TGT uses the upstream init.d script or the TGT systemd config file (both of them address all of the previous described problems).
The commands `tgtadm --op update --mode sys --name State -v offline`, `tgt-admin --offline ALL` and `tgt-admin -e -c /etc/tgt/targets.conf`, for example, correctly turns TGT down (the to first commands) and reloads in the correct way (the last command).
I think this bug report can be closed now, since it seems to be solved in newer versions.
Hi everyone.
It seems like the TGT bug (when stopping, reloading or restarting the TGT deamon) is solved in Ubuntu Artful (17.10). I did not make tests, but now TGT uses the upstream init.d script or the TGT systemd config file (both of them address all of the previous described problems).
The commands `tgtadm --op update --mode sys --name State -v offline`, `tgt-admin --offline ALL` and `tgt-admin -e -c /etc/tgt/ targets. conf`, for example, correctly turns TGT down (the to first commands) and reloads in the correct way (the last command).
I think this bug report can be closed now, since it seems to be solved in newer versions.
Below, the systemd tgt service config file:
``` man:tgtd( 8) target
[Unit]
Description=(i)SCSI target daemon
Documentation=
After=network.
[Service] /usr/sbin/ tgtd -f /usr/sbin/ tgtadm --op update --mode sys --name State -v offline /usr/sbin/ tgt-admin -e -c /etc/tgt/ targets. conf /usr/sbin/ tgtadm --op update --mode sys --name State -v ready
Type=notify
TasksMax=infinity
ExecStart=
ExecStartPost=
ExecStartPost=
ExecStartPost=
ExecStop= /usr/sbin/ tgtadm --op update --mode sys --name State -v offline /usr/sbin/ tgt-admin --offline ALL /usr/sbin/ tgt-admin --update ALL -c /dev/null -f /usr/sbin/ tgtadm --op delete --mode system
ExecStop=
ExecStop=
ExecStop=
ExecReload= /usr/sbin/ tgt-admin --update ALL -c /etc/tgt/ targets. conf
Restart=on-failure
[Install] multi-user. target
WantedBy=
```