** Description changed:

  [ Impact ]
  
  When running autopkgtest for resource-agents in a VM testbed with a
  minimal kernel (such as LXD VMs on Jammy running linux-image-kvm), the
  `debian/tests/run-ocft iscsi` test fails during SETUP-AGENT with:
  
      ERROR: Warning: Could not load preferences file 
/root/.targetcli/prefs.bin.
      b'modprobe: FATAL: Module iscsi_target_mod not found in directory 
/lib/modules/5.15.0-1109-kvm\n'
      ERROR: 'SETUP-AGENT' failed, the return code is 1.
      WARNING: SETUP failed, break all tests of 'iscsi'.
      command13 FAIL non-zero exit status 1
  
+ Test log:
+ 
https://autopkgtest.ubuntu.com/results/autopkgtest-jammy/jammy/amd64/r/resource-agents/20261006_103706_a9699@/log.gz
+ 
  Investigation into the kernel configuration of linux-kvm on Jammy (from 
linux-buildinfo-*-kvm) shows:
      CONFIG_TARGET_CORE=m
      # CONFIG_ISCSI_TARGET is not set
  
  The linux-kvm kernel flavour intentionally disables the LIO iSCSI target
  subsystem (`# CONFIG_ISCSI_TARGET is not set`), and there are no
  `iscsi_target_mod.ko` modules built for it. Furthermore, simply
  installing `linux-modules-extra-*-generic` in `debian/tests/control`
- does not resolve the issue, because `modprobe` cannot load generic
- kernel modules into a running `linux-kvm` kernel due to version, ABI,
- and module signature mismatches.
+ does not resolve the issue, because `modprobe` only looks under
+ `/lib/modules/$(uname -r)/`, and cross-kernel loading via `insmod` is
+ blocked by kernel lockdown (`Lockdown: insmod: unsigned module loading
+ is restricted`).
  
- Therefore, the cleanest and most robust solution conforming to
- Debian/Ubuntu autopkgtest standards is to check whether
- `iscsi_target_mod` can be probed by the running kernel, and gracefully
- SKIP the test when kernel support is absent. This prevents false-
- positive autopkgtest regressions from blocking proposed migration for
- reverse dependencies such as open-iscsi (LP: #2147499).
+ ---
+ 
+ Why this issue only occurs on Jammy (and not on Noble or Resolute):
+ 
+ 1. Jammy builds and distributes a dedicated "disk-kvm.img":
+ In Jammy (22.04), cloud-image pipeline generates a dedicated lightweight VM 
artifact (jammy-server-cloudimg-amd64-disk-kvm.img, as indexed on 
cloud-images.ubuntu.com/jammy/current/ and Simplestreams).
+ Its package manifest (jammy-server-cloudimg-amd64-disk-kvm.manifest) confirms 
that it is intentionally built with linux-image-kvm (5.15.0-*-kvm).
+ Because CONFIG_ISCSI_TARGET is disabled, iscsi_target_mod.ko is completely 
absent in Jammy LXD VMs.
+ 
+ 2. Noble and Resolute no longer build "kvm" VM images:
+ Starting from 24.04 (Noble), Canonical deprecated the dedicated disk-kvm 
build targets. As verifiable from cloud-images.ubuntu.com for noble and 
resolute, there are no longer any disk-kvm artifacts published.
+ Instead, all cloud and LXD VM images consume the unified disk1.img 
(server-cloudimg-amd64.img), which ships the standard generic kernel out of the 
box (as confirmed by their official manifests):
+ - linux-image-6.8.0-*-generic (on Noble)
+ - linux-image-7.0.0-*-generic (on Resolute)
+ Because the standard generic kernel enables CONFIG_ISCSI_TARGET=m by default, 
iscsi_target_mod.ko is natively present and loaded without issue on Noble and 
Resolute.
+ 
+ Therefore, this regression is strictly confined to Jammy's LXD VM
+ environment, blocking proposed migration for reverse dependencies such
+ as open-iscsi (LP: #2147499).
  
  [ Test Plan ]
  
  1. On a testbed running a kernel without iscsi_target_mod support (e.g. Jammy 
LXD VM running linux-kvm):
     Run:
         sudo debian/tests/run-ocft iscsi
     Expected result before fix:
-        Fails during setup with FATAL: Module iscsi_target_mod not found, exit 
status 1.
+        Fails during setup with "FATAL: Module iscsi_target_mod not found", 
exit status 1.
     Expected result after fix:
         Outputs:
             SKIP: iscsi_target_mod module is not available in running kernel 
<version>
-        and exits 0 (clean skip / pass).
+        and exits 0 (clean skip / PASS).
  
  2. On a testbed running a generic kernel where iscsi_target_mod is available 
(e.g. linux-image-generic):
     Run:
         sudo debian/tests/run-ocft iscsi
     Expected result:
         Module loads and ocft test -v iscsi executes and passes normally.
  
  [ Where problems could occur ]
  
  The fix only touches the autopkgtest test runner script 
`debian/tests/run-ocft`. It does not modify any binaries, packaged agent 
scripts, or runtime behavior of resource-agents itself.
  The only potential risk is if a regression in the iscsi resource agent is not 
caught on environments lacking kernel module support; however, on generic 
environments the test will continue to execute fully as before.
  
  [ Other Info ]
  
- Relevant discussion in LP: #2147499 comment #24.
- Tag: block-proposed-jammy
+ - Relevant discussion in LP: #2147499 comment #24.
+ - Tag: block-proposed-jammy
+ - Proposed migration excuses tracking:
+   
https://ubuntu-archive-team.ubuntu.com/proposed-migration/jammy/update_excuses.html#open-iscsi
+   
https://ubuntu-archive-team.ubuntu.com/proposed-migration/noble/update_excuses.html#open-iscsi
+   
https://ubuntu-archive-team.ubuntu.com/proposed-migration/resolute/update_excuses.html#open-iscsi

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2170272

Title:
  [SRU] resource-agents: autopkgtest iscsi fails on kernels without LIO
  iSCSI target support (e.g. linux-kvm)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/resource-agents/+bug/2170272/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to