[Bug 1755858] Re: iscsid autostarts on all servers when it has nothing to do

 Christian Ehrhardt  1755858 at bugs.launchpad.net
Wed May 23 12:55:56 UTC 2018


Most basic tests cross check on Fedora:
First I tried a safe no-op
  $ iscsiadm -m discovery -t sendtargets -p 127.0.0.1
  This is working fine on fedora to activate the service

Then I tried on the fedora setup if the cmd we call would activate it.
  $ /sbin/iscsiadm -m node --loginall=automatic
    iscsiadm: No records found
And the service is not activated.
But that is ok, I really had no config and /lib/systemd/system/open-iscsi.service explicitly defined RC=21 as ok for just this reason.

If to configure something:
$ targetname="iqn.2016-11.foo.com:target.1.iscsi"
$ truncate --size 100M backingfile1
$ tgtadm --lld iscsi --op new --mode target --tid 1 -T "${targetname}"
$ tgtadm --lld iscsi --op bind --mode target --tid 1 -I ALL
$ portal="127.0.0.1:3260"
$ iscsiadm --mode discovery --type sendtargets --portal 127.0.0.1
$ iscsiadm --mode node --targetname "${targetname}" --portal 127.0.0.1:3260 --login
$ iscsiadm --mode node --targetname "${targetname}" --portal "${portal}" --logout

This should now be usable

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

Title:
  iscsid autostarts on all servers when it has nothing to do

Status in open-iscsi package in Ubuntu:
  Triaged
Status in open-iscsi source package in Bionic:
  Triaged

Bug description:
  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/open-iscsi/+bug/1755858/+subscriptions



More information about the foundations-bugs mailing list