iscsid does not run if there are only initramfs initiated targets
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
open-iscsi (Ubuntu) |
Fix Released
|
High
|
Scott Moser | ||
Bionic |
Fix Released
|
High
|
Scott Moser | ||
Cosmic |
Fix Released
|
High
|
Scott Moser |
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 iscsi mounts that were 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/
SUBSYSTEM=
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-<
example:
ip-192.
See other info section below for a 'udevadm info' output.
c.) uses SYSTEMD_WANTS.
More information can be seen on that at
https:/
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.
**Note**: This change caused regression described in bug 1807978.
[Other Info]
Here is output of 'udevadm info' on a iscsi root device:
http://
There is autopkgtest run of proposed
bionic: http://
cosmic: http://
=== 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.
* bug 1807978: vmtest: iscsi/LVM tests failing on cosmic/disco
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: open-iscsi 2.0.874-5ubuntu2.3 [modified: lib/systemd/
ProcVersionSign
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.
PATH=(custom, no user)
LANG=C.UTF-8
SHELL=/bin/bash
SourcePackage: open-iscsi
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile.
Related branches
- git-ubuntu developers: Pending requested
-
Diff: 184 lines (+64/-5)6 files modifieddebian/changelog (+12/-0)
debian/iscsi-disk.rules (+3/-0)
debian/open-iscsi.install (+1/-0)
debian/tests/patch-image (+6/-0)
debian/tests/test-open-iscsi.py (+40/-5)
debian/tests/tgt-boot-test (+2/-0)
- git-ubuntu developers: Pending requested
-
Diff: 261 lines (+140/-5)5 files modifieddebian/changelog (+10/-0)
debian/iscsi-disk.rules (+3/-0)
debian/open-iscsi.install (+1/-0)
debian/tests/patch-image (+86/-0)
debian/tests/test-open-iscsi.py (+40/-5)
- Steve Langasek (community): Approve
- Christian Ehrhardt : Pending requested
- Dimitri John Ledkov: Pending requested
- git-ubuntu developers: Pending requested
-
Diff: 174 lines (+62/-4)6 files modifieddebian/changelog (+11/-0)
debian/iscsi-disk.rules (+3/-0)
debian/open-iscsi.install (+1/-0)
debian/tests/patch-image (+6/-0)
debian/tests/test-open-iscsi.py (+39/-4)
debian/tests/tgt-boot-test (+2/-0)
Changed in open-iscsi (Ubuntu): | |
assignee: | nobody → Scott Moser (smoser) |
importance: | Undecided → High |
status: | New → Confirmed |
description: | updated |
tags: | added: id-5be36a3244fbc018f0cc1591 |
description: | updated |
description: | updated |
description: | updated |
The goal here should be simple.
If there are iscsi sessions, then iscsid should be started/running.
You can tell if there are iscsi sessions by either: iscsi_session is non-empty.
- 'iscsiadm --mode=session' exits 0
- /sys/class/
The current open-iscsi.service implementation will not result in a
iscsid.service running if it did not create sessions (either because
they already existed or because there was nothing to do).
I'm trying to work out the best way to implement that logic in the
systemd services that we have now.
Would it be acceptable for the open-iscsi.service file to simply execute iscsi_session ?
'systemctl start iscsid.service'
if there was content in /sys/class/
My testing shows that 'systemctl start SERVICE' for a service that
is already running exits 0 and is not harmful.