[Bug 1802354] Re: iscsid does not run if there are only initramfs initiated targets

Scott Moser ssmoser2+ubuntu at gmail.com
Thu Nov 15 17:01:18 UTC 2018


Just for reference, this was actually fixed in disco at 2.0.874-5ubuntu10.
But that never made it into the release pocket before 5ubuntu11 went in.
The relevant changelogs:

open-iscsi (2.0.874-5ubuntu11) disco; urgency=medium

  * debian/tests/test-open-iscsi.py: Fix called process error.
    If no image was available for a release, a NameError exception would be
    raised.

 -- Scott Moser <smoser at ubuntu.com>  Wed, 14 Nov 2018 16:50:29 -0500

open-iscsi (2.0.874-5ubuntu10) disco; urgency=medium

  * d/iscsi-disk.rules, d/tests: Add a udev rule so that iscsid.service
    will be run when udev disks are attached.  (LP: #1802354)
  * debian/tests: improve tgt boot test
     - disable snapd and snap.seeded services to avoid unnecessary
       resource consumption during tests.
     - save artifacts from the test run.

 -- Scott Moser <smoser at ubuntu.com>  Wed, 14 Nov 2018 16:05:46 -0500


** Description changed:

+ === Begin SRU Template ===
+ [Impact] 
+ A previous change to open-iscsi made under bug 1755858 caused a regression
+ that is seen when a system has only a single iscsi mount that was made
+ in the initramfs.  The most likely scenario would be iscsi root.
+ 
+ The problem seen is that in this scenario the iscsid.service will not be
+ started.  That generally works, but will have unexpected issues if
+ service is done to the iscsi target (external system).  That could occur
+ if the remote system needed to be serviced for any reason.  If iscsid
+ is running, the client will handle this scenario properly.
+ 
+ The change made here is to add a udev rule installed into
+ /lib/udev/rules.d/70-iscsi-disk.rules with the content:
+    SUBSYSTEM=="block", ACTION=="add", ENV{ID_PATH}=="*-iscsi-*",
+        ENV{SYSTEMD_WANTS}="iscsid.service"
+ 
+ The key things to see in that rule are:
+ a.) only matches on add of a block device.
+ We will not currently stop the iscsid.service ever via udev.
+ 
+ b.) only matches a PATH with '-iscsi-' in it.
+ tests show that ID_PATH will come up with something like:
+    ip-<ipv4-dotted-quad>:<port>-iscsi-<target>-lun-<lun>
+ example:
+    ip-192.168.1.1:3270-iscsi-mydisk1-lun-2
+ 
+ See other info section below for a 'udevadm info' output.
+ 
+ c.) uses SYSTEMD_WANTS.
+ More information can be seen on that at
+  https://www.freedesktop.org/software/systemd/man/systemd.device.html
+ doc states:
+ 
+   "[systemd_wants] may be used to activate arbitrary units when a specific
+    device becomes available."
+ 
+ [Test Case]
+ A check for iscsid.service to be running has been added to the dep8
+ test of the open-iscsi package.  The simplist check is to have
+ the dep8 test run.  The test will gate entry into -proposed so
+ we can have confidence the bug is fixed.
+ 
+ Since this bug was originally reported on Oracle public cloud instances
+ we should also test that platform.
+ 
+ To do that:
+  * launch a hardware instance on oracle of 16.04.
+  * verify iscsid.service is *not* running.
+    If iscsid.service is already running, it may have been started by
+    an image modification.  To make this a valid test, you will
+    then need to disable whatever change made that occur.
+  * enable proposed and upgrade
+  * reboot
+  * verify that iscsid.service is running.
+ 
+ [Regression Potential] 
+ The most likely chance for regression here would be the iscsid.service
+ running when it should not be running.  Saving a udev rule execution
+ error, a false-positive on the 'match' above would trigger this.
+ It seems relatively unlikely that a non-iscsi device would have a ID_PATH
+ containing '-iscsi-', but is possible.
+ 
+ [Other Info]
+ Here is output of 'udevadm info' on a iscsi root device:
+     http://paste.ubuntu.com/p/dj89ScVR82/
+ 
+ === End SRU Template ===
+ 
  It was reported that after the changes made in bug 1755858, the iscsid
  service was not running when initramfs (via iscsi_* params or iBft)
  set up an iscsi mount.
  
  This seems to not be a problem until there is a restart of the iscsi
  *host* service or some other hiccup.  Thus, in normal testing you will
  not see this issue.
  
  --
  Related bugs:
   * bug 1755858: iscsid autostarts on all servers when it has nothing to do.
  
  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: open-iscsi 2.0.874-5ubuntu2.3 [modified: lib/systemd/system/open-iscsi.service]
  ProcVersionSignature: Ubuntu 4.15.0-36.39-generic 4.15.18
  Uname: Linux 4.15.0-36-generic x86_64
  ApportVersion: 2.20.9-0ubuntu7.4
  Architecture: amd64
  Date: Thu Nov  8 17:42:46 2018
  ProcEnviron:
   TERM=screen.xterm-256color
   PATH=(custom, no user)
   LANG=C.UTF-8
   SHELL=/bin/bash
  SourcePackage: open-iscsi
  UpgradeStatus: No upgrade log present (probably fresh install)
  mtime.conffile..etc.iscsi.iscsid.conf: 2018-10-12T16:51:00.187144

** Also affects: open-iscsi (Ubuntu Cosmic)
   Importance: Undecided
       Status: New

** Also affects: open-iscsi (Ubuntu Bionic)
   Importance: Undecided
       Status: New

** Changed in: open-iscsi (Ubuntu Bionic)
       Status: New => Confirmed

** Changed in: open-iscsi (Ubuntu Cosmic)
       Status: New => Confirmed

** Changed in: open-iscsi (Ubuntu Bionic)
   Importance: Undecided => High

** Changed in: open-iscsi (Ubuntu Cosmic)
   Importance: Undecided => High

** Changed in: open-iscsi (Ubuntu Bionic)
     Assignee: (unassigned) => Scott Moser (smoser)

** Changed in: open-iscsi (Ubuntu Cosmic)
     Assignee: (unassigned) => Scott Moser (smoser)

** Changed in: open-iscsi (Ubuntu Bionic)
       Status: Confirmed => In Progress

** Changed in: open-iscsi (Ubuntu Cosmic)
       Status: Confirmed => In Progress

-- 
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/1802354

Title:
  iscsid does not run if there are only initramfs initiated targets

Status in open-iscsi package in Ubuntu:
  Fix Released
Status in open-iscsi source package in Bionic:
  In Progress
Status in open-iscsi source package in Cosmic:
  In Progress

Bug description:
  === Begin SRU Template ===
  [Impact] 
  A previous change to open-iscsi made under bug 1755858 caused a regression
  that is seen when a system has only a single iscsi mount that was made
  in the initramfs.  The most likely scenario would be iscsi root.

  The problem seen is that in this scenario the iscsid.service will not be
  started.  That generally works, but will have unexpected issues if
  service is done to the iscsi target (external system).  That could occur
  if the remote system needed to be serviced for any reason.  If iscsid
  is running, the client will handle this scenario properly.

  The change made here is to add a udev rule installed into
  /lib/udev/rules.d/70-iscsi-disk.rules with the content:
     SUBSYSTEM=="block", ACTION=="add", ENV{ID_PATH}=="*-iscsi-*",
         ENV{SYSTEMD_WANTS}="iscsid.service"

  The key things to see in that rule are:
  a.) only matches on add of a block device.
  We will not currently stop the iscsid.service ever via udev.

  b.) only matches a PATH with '-iscsi-' in it.
  tests show that ID_PATH will come up with something like:
     ip-<ipv4-dotted-quad>:<port>-iscsi-<target>-lun-<lun>
  example:
     ip-192.168.1.1:3270-iscsi-mydisk1-lun-2

  See other info section below for a 'udevadm info' output.

  c.) uses SYSTEMD_WANTS.
  More information can be seen on that at
   https://www.freedesktop.org/software/systemd/man/systemd.device.html
  doc states:

    "[systemd_wants] may be used to activate arbitrary units when a specific
     device becomes available."

  [Test Case]
  A check for iscsid.service to be running has been added to the dep8
  test of the open-iscsi package.  The simplist check is to have
  the dep8 test run.  The test will gate entry into -proposed so
  we can have confidence the bug is fixed.

  Since this bug was originally reported on Oracle public cloud instances
  we should also test that platform.

  To do that:
   * launch a hardware instance on oracle of 16.04.
   * verify iscsid.service is *not* running.
     If iscsid.service is already running, it may have been started by
     an image modification.  To make this a valid test, you will
     then need to disable whatever change made that occur.
   * enable proposed and upgrade
   * reboot
   * verify that iscsid.service is running.

  [Regression Potential] 
  The most likely chance for regression here would be the iscsid.service
  running when it should not be running.  Saving a udev rule execution
  error, a false-positive on the 'match' above would trigger this.
  It seems relatively unlikely that a non-iscsi device would have a ID_PATH
  containing '-iscsi-', but is possible.

  [Other Info]
  Here is output of 'udevadm info' on a iscsi root device:
      http://paste.ubuntu.com/p/dj89ScVR82/

  === End SRU Template ===

  It was reported that after the changes made in bug 1755858, the iscsid
  service was not running when initramfs (via iscsi_* params or iBft)
  set up an iscsi mount.

  This seems to not be a problem until there is a restart of the iscsi
  *host* service or some other hiccup.  Thus, in normal testing you will
  not see this issue.

  --
  Related bugs:
   * bug 1755858: iscsid autostarts on all servers when it has nothing to do.

  ProblemType: Bug
  DistroRelease: Ubuntu 18.04
  Package: open-iscsi 2.0.874-5ubuntu2.3 [modified: lib/systemd/system/open-iscsi.service]
  ProcVersionSignature: Ubuntu 4.15.0-36.39-generic 4.15.18
  Uname: Linux 4.15.0-36-generic x86_64
  ApportVersion: 2.20.9-0ubuntu7.4
  Architecture: amd64
  Date: Thu Nov  8 17:42:46 2018
  ProcEnviron:
   TERM=screen.xterm-256color
   PATH=(custom, no user)
   LANG=C.UTF-8
   SHELL=/bin/bash
  SourcePackage: open-iscsi
  UpgradeStatus: No upgrade log present (probably fresh install)
  mtime.conffile..etc.iscsi.iscsid.conf: 2018-10-12T16:51:00.187144

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



More information about the foundations-bugs mailing list