]> xenbits.xensource.com Git - libvirt.git/commit
Stop iSCSI targets automatically logging back in after logout
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 12 Nov 2010 15:21:48 +0000 (15:21 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 23 Nov 2010 14:55:45 +0000 (14:55 +0000)
commit3c12b6542cfc994f6b9cf3aef623767bf441c3ea
treeacc172b2575ac73b3ac3be4f0362bb298292986f
parent59446096ffad5049f66b0485fd2a5239a03dd58f
Stop iSCSI targets automatically logging back in after logout

The Linux iSCSI initiator toolchain has the dubious feature that
if you ever run the 'sendtargets' command to merely query what
targets are available from a server, the results will be recorded
in /var/lib/iscsi. Any time the '/etc/init.d/iscsi' script runs
in the future, it will then automatically login to all those
targets. /etc/init.d/iscsi is automatically run whenever a NIC
comes online.

So from the moment you ask a server what targets are available,
your client will forever more automatically try to login to all
targets without ever asking if you actually want it todo this.

To stop this stupid behaviour, we need to run

  iscsiadm --portal $PORTAL --target $TARGET
   --op update --name node.startup --value manual

For every target on the server.

* src/storage/storage_backend_iscsi.c: Disable automatic login
  for targets found as a result of a 'sendtargets' command
src/storage/storage_backend_iscsi.c