open-iscsi should not leave around the stamp file if no connections were made
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
open-iscsi (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Cosmic |
Won't Fix
|
Undecided
|
Unassigned | ||
Disco |
Fix Released
|
Undecided
|
Unassigned |
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:/
* 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/
[ 881.438313] shutdown[1]: Failed to finalize file systems, ignoring
(2) * Start an iSCSI instance in Oracle Cloud (https:/
* Monitor the instance's console.
* Restart the instance
* Observe the instance rebooting properly
[Regression Potential]
* The fix is removing /run/initramfs/
[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/
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/
--- 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/
+ found=0
+ for disk in /dev/disk/
+ if ! "$(readlink -f "$disk")" ; then
+ continue
+ fi
+ found=1
+ break;
+ done
+ if [ $found = 0 ] ; then
+ rm /run/initramfs/
+ fi
+fi
+
exit 0
tags: | added: id-5bbe5cb1a3a04d69ef6d9037 |
Changed in open-iscsi (Ubuntu Cosmic): | |
status: | New → Won't Fix |
description: | updated |
description: | updated |
description: | updated |
description: | updated |
tags: | added: verification-done-bionic |
This bug was fixed in the package open-iscsi - 2.0.874-5ubuntu13
---------------
open-iscsi (2.0.874-5ubuntu13) disco; 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 <email address hidden> Sun, 09 Dec 2018 22:29:20 +0000