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:


```
[Unit]
Description=(i)SCSI target daemon
Documentation=man:tgtd(8)
After=network.target

[Service]
Type=notify
TasksMax=infinity
ExecStart=/usr/sbin/tgtd -f
ExecStartPost=/usr/sbin/tgtadm --op update --mode sys --name State -v offline
ExecStartPost=/usr/sbin/tgt-admin -e -c /etc/tgt/targets.conf
ExecStartPost=/usr/sbin/tgtadm --op update --mode sys --name State -v ready

ExecStop=/usr/sbin/tgtadm --op update --mode sys --name State -v offline
ExecStop=/usr/sbin/tgt-admin --offline ALL
ExecStop=/usr/sbin/tgt-admin --update ALL -c /dev/null -f
ExecStop=/usr/sbin/tgtadm --op delete --mode system

ExecReload=/usr/sbin/tgt-admin --update ALL -c /etc/tgt/targets.conf
Restart=on-failure

[Install]
WantedBy=multi-user.target
```

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1294267

Title:
  tgt doesn't export some LUNs after a reload operation (SIGHUP)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/tgt/+bug/1294267/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to