summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorMatwey V. Kornilov <matwey.kornilov@gmail.com>2021-02-01 20:02:15 +0300
committerMatwey V. Kornilov <matwey.kornilov@gmail.com>2021-02-01 20:11:02 +0300
commit23681a6f4fb068aee8945be9e9d93987204c155c (patch)
tree9d545543ecda41df4da5d9534fbb3e29f2e81ad6 /etc
parent76a5ebf955702f676a5ea5f7b43bb8fb436edc40 (diff)
downloadopen-iscsi-23681a6f4fb068aee8945be9e9d93987204c155c.tar.gz
Wants=network-online.target in iscsi.service
Setting After= without Requires= or Wants= is not enough to pull network-online.target as a dependency. Currently, if some other service requires network-online.target then iscsi.service is started after network-online.target If no any other services require network-online.target then iscsi.service may be started before networking is working. The latter leads to the following issues: iscsiadm: Could not login to [iface: default, target: XXX, portal: XXX,3260]. iscsiadm: initiator reported error (4 - encountered connection failure) Reference: https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
Diffstat (limited to 'etc')
-rw-r--r--etc/systemd/iscsi.service1
1 files changed, 1 insertions, 0 deletions
diff --git a/etc/systemd/iscsi.service b/etc/systemd/iscsi.service
index 2f2bf81..5ceb25e 100644
--- a/etc/systemd/iscsi.service
+++ b/etc/systemd/iscsi.service
@@ -5,6 +5,7 @@ Before=remote-fs.target
After=network.target network-online.target
After=iscsid.service iscsi-init.service
Requires=iscsid.socket iscsi-init.service
+Wants=network-online.target
[Service]
Type=oneshot