[Bug 1800681] Re: open-iscsi should not leave around the stamp file if no connections were made

Launchpad Bug Tracker 1800681 at bugs.launchpad.net
Tue May 12 17:03:03 UTC 2020


This bug was fixed in the package open-iscsi - 2.0.874-5ubuntu2.9

---------------
open-iscsi (2.0.874-5ubuntu2.9) bionic; urgency=medium

  * Ship open-iscsi finalrd hook. LP: #1800681

open-iscsi (2.0.874-5ubuntu2.8) bionic; urgency=medium

  [ Robert C Jennings & Dimitri John Ledkov ]
  * If iscsi root was requested, but no iscsi devices were mounted, remove
    the initramfs interfaces stamp file. Meaning, that on shutdown there
    is no 30s delay, whilst trying to re-establish iscsi login to perform
    a logout. LP: #1800681

 -- Dimitri John Ledkov <xnox at ubuntu.com>  Tue, 26 Nov 2019 14:56:20
+0000

** Changed in: open-iscsi (Ubuntu Bionic)
       Status: Fix Committed => Fix Released

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

Title:
  open-iscsi should not leave around the stamp file if no connections
  were made

Status in open-iscsi package in Ubuntu:
  Fix Released
Status in open-iscsi source package in Bionic:
  Fix Released
Status in open-iscsi source package in Cosmic:
  Won't Fix
Status in open-iscsi source package in Disco:
  Fix Released

Bug description:
  Separately, ship finalrd hook which cloud images can switch to using.
  By default, it is inert, as finalrd itself is not pulled in.

  ---

  [Impact]

   * Shutdown is delayed by 30s when open-iscsi is configured to auto
  mode but no iscsi devices were found.

  [Test Case]

  (1) * Start a PV (non-iscsi) instance in Oracle Cloud (https://www.oracle.com/cloud/)
   * Monitor the instance's console.
   * Shut down the instance
   * Observe the shutdown proceeding in a timely manner without the following printouts:

  [  851.308389] sd-umoun[2880]: Failed to unmount /oldroot: Device or resource busy
  [  851.311743] sd-umoun[2881]: Failed to unmount /oldroot/dev: Device or resource busy
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  iscsiadm: No active sessions.
  Unexpected iSCSI Connection State, forcing iSCSI logout.
  iscsiadm: No matching sessions found
  [  881.434458] sd-execu[2882]: /usr/lib/systemd/system-shutdown/open-iscsi.finalrd failed with exit status 21.
  [  881.438313] shutdown[1]: Failed to finalize  file systems, ignoring

  (2) * Start an iSCSI instance in Oracle Cloud (https://www.oracle.com/cloud/)
   * Monitor the instance's console.
   * Restart the instance
   * Observe the instance rebooting properly

  [Regression Potential]

   * The fix is removing /run/initramfs/open-iscsi.interface during
  running initramfs scripts if not iscsi disks were found. In case not
  detecting an iscsi device but removing the .interface file the system
  may reconfigure the network interface later losing connection to the
  iscsi device.

  [Original Bug Text]

  open-iscsi should not leave around the stamp file if no connections
  were made

  open-iscsi finalrd hook is sensitive to /run/initramfs/open-
  iscsi.interface as an indicator that rootfs might have been an iscsi
  mount, and thus logout needs to happen inside finalrd.

  However, in auto-mode, and without any iscsi hard-drives found, that
  stamp file is still left around. It should be cleaned up, such that
  such boots do not result in 30s shutdown delay.

  Proposed patch is this:

  /usr/share/initramfs-tools/scripts/local-top$ diff -u iscsi.orig iscsi
  --- iscsi.orig	2018-10-30 15:53:36.314256545 +0000
  +++ iscsi	2018-10-30 15:53:02.883686328 +0000
  @@ -360,4 +360,19 @@
    done
   fi

  +# Remove the interface file if no disks are present
  +if [ -f /run/initramfs/open-iscsi.interface ] ; then
  +	found=0
  +	for disk in /dev/disk/by-path/*-iscsi-*; do
  +		if ! "$(readlink -f "$disk")" ; then
  +			continue
  +		fi
  +		found=1
  +		break;
  +	done
  +	if [ $found = 0 ] ; then
  +		rm /run/initramfs/open-iscsi.interface
  +	fi
  +fi
  +
   exit 0

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



More information about the foundations-bugs mailing list