In bionic, the open-iscsi systemd unit has the following guards to keep it from running on systems with no iscsi targets configured:
# Must have some pre-defined targets to login to
ConditionDirectoryNotEmpty=|/etc/iscsi/nodes
# or have a session to use via iscsid
ConditionDirectoryNotEmpty=|/sys/class/iscsi_session
However, iscsid starts from a separate unit and does not include this check. Thus, iscsid starts on every Ubuntu Server install, whether or not it has anything to do.
We should replicate these unit conditionals to the iscsid unit, to ensure the daemon doesn't run (consuming memory, and slowing boot) when not needed.
In bionic, the open-iscsi systemd unit has the following guards to keep it from running on systems with no iscsi targets configured:
# Must have some pre-defined targets to login to oryNotEmpty= |/etc/iscsi/ nodes oryNotEmpty= |/sys/class/ iscsi_session
ConditionDirect
# or have a session to use via iscsid
ConditionDirect
However, iscsid starts from a separate unit and does not include this check. Thus, iscsid starts on every Ubuntu Server install, whether or not it has anything to do.
We should replicate these unit conditionals to the iscsid unit, to ensure the daemon doesn't run (consuming memory, and slowing boot) when not needed.