open-iscsi unconditionally requires ib_iser module which is not built on all Ubuntu kernels

Bug #1833586 reported by Steve Langasek
24
This bug affects 2 people
Affects Status Importance Assigned to Milestone
open-iscsi (Ubuntu)
Fix Released
Medium
Steve Langasek

Bug Description

Currently, open-iscsi ships a /lib/modules-load.d/open-iscsi.conf which hard-codes the iscsi_tcp and ib_iser modules. However, we ship open-iscsi as part of the standard ubuntu-server seed, but not all images that derive from this seed have kernels that include the ib_iser module. In particular, we've noticed that the Raspberry Pi kernel does not. This is noticeable because if a module doesn't exist, the systemd-modules-load service fails, and leaves the system boot in a degraded mode per systemd.

And unfortunately ib_iser has no modaliases, so it's not as if this is something that can be switched to udev autoloading.

Options for resolving this:

 - get the kernel team to set CONFIG_INFINIBAND_ISER=m on all kernels. But this would increase kernel memory consumption unconditionally on possibly memory-constrained arm systems, for no real value. (A spot check on another arch shows roughly 750K; not huge but not nothing)
 - drop ib_iser from debian/open-iscsi.kmod (why does use of iscsi dictate loading a particular infiniband module? there's nothing in the debian/changelog that explains)
 - vary the contents of /lib/modules-load.d/open-iscsi.conf (only sensible if we believe that this module would never be useful on any armhf)
 - remove open-iscsi from the server seed; historically, this is blocked by older versions of MAAS depending on mounting ephemeral images via iscsi, but perhaps the depends on open-iscsi could be made architecture-dependent, if only armhf is affected by this problem and MAAS doesn't support any armhf targets?

This needs input from the Server Team.

Related branches

Revision history for this message
Steve Langasek (vorlon) wrote :

After discussing with Ryan on IRC:

 - the static loading of the modules is bad, and shouldn't be necessary, as it should be possible to figure out at runtime which transports are actually needed by iscsid
 - the current implementation doesn't work in the initramfs at all since the file it creates is only read by systemd
 - upstream's code has support for loading these modules on-demand, *IF* we link against libkmod.

Proposed solution:

 - Build-depend on libkmod-dev
 - Drop the file for loading modules statically
 - Add ib_iser to the list of modules for the initramfs hook, so that iscsi rootfs will work correctly over infiniband as well

Revision history for this message
Steve Langasek (vorlon) wrote :

Except the upstream build system doesn't actually do anything reasonable wrt libkmod; so instead let's just fall back to letting iscsid modprobe the modules (which it will also do when it needs to).

Steve Langasek (vorlon)
Changed in open-iscsi (Ubuntu):
status: New → Fix Committed
assignee: nobody → Steve Langasek (vorlon)
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package open-iscsi - 2.0.874-7.1ubuntu2

---------------
open-iscsi (2.0.874-7.1ubuntu2) eoan; urgency=medium

  * debian/open-iscsi.kmod: drop; no static module list is needed if we let
    iscsid load modules itself. LP: #1833586.
  * debian/extra/initramfs.hook: add ib_iser to the list of modules
    included in the initramfs, so that we can in principle support iscsi
    root on infiniband.

 -- Steve Langasek <email address hidden> Thu, 20 Jun 2019 13:48:46 -0700

Changed in open-iscsi (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Glad to find this discussed and solved already when waking up - thanks Ryan and Steve!

To complete the discussions I'm adding a little reference as on IRC it seemed this question was left open:
"[20:40] <vorlon> rharper: right, I also fundamentally question why the open-iscsi package should hard-code the modules for loading if there's additional configuration required (not necessarily extra packages, but at least non-default config options that should maybe be detected to trigger on-demand module loading)"

I think the history on this is [1] which was converting an old unconditional load (that would do || true, and therefore never make it fail/bad) into something else which instead of the old code had the negative effect that Steve reported here initially.

[1]: https://salsa.debian.org/linux-blocks-team/open-iscsi/commit/592d3d1f6

tags: added: id-5c5053cad3efa20de8138de0
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Looking at this from the perspective of the pi images - should we maybe consider SRUing this down to bionic for the upcoming point-release? Currently it's one of the reasons of running in systemd state degraded in pi's, might be nice to finally have a clean situation. The change looks SRUable. Would there be any negative consequences?

Revision history for this message
Steve Langasek (vorlon) wrote :

While I do believe the change is PROBABLY safe, I don't think it's particularly justifiable as an SRU. Degraded mode is ugly but aside from masking other bugs, doesn't make a difference at runtime.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.