** Description changed:

+ [Impact]
+ 
  To address bug 2080474, we now install multipath-tools-boot when
  building Ubuntu server live ISOs so that the multipath stack is present
  in the initramfs.
  
  Unfortunately, when booting the installer, the first invocation of
  `multipathd -B` (as it's done by the init-top script) fails because the
  /etc/multipath/bindings file does not exist:
  
  # multipath -B -d
  | multipathd v0.11.1: start up
  | reconfigure: setting up paths and maps
- | _check_bindings_file: fialed to read header from /etc/multipath/bindings
+ | _check_bindings_file: failed to read header from /etc/multipath/bindings
  | ERROR: bad settings in read-only bindings file /etc/multipath/bindings
  | fatal error applying configuration - aborting
  | multipathd: shut down
  
  I say _first_ invocation, because surprisingly, the failing multipathd
  command still initializes the /etc/multipath/bindings file properly, so
  the next invocation of the same command can succeed.
  
  # cat /etc/multipath/bindings
  # Multipath bindings, Version : 1.0
  # NOTE: this file is automatically maintained by the multipath program.
  # You should not need to edit this file in normal circumstances.
  #
  # Format:
  # alias wwid
  #
  
  # multipathd -B -d
  | multipathd v0.11.1: start up
  | reconfigure: setting up paths and maps
  
  The initramfs-tools hook script for multipath can copy over the
  /etc/multipath/bindings file to the initramfs, but only does so if it
- exists, which is not the case just after installing multipath-tools-
- boot.
+ exists, which is not the case just after installing multipath-tools-boot
+ in the image building process.
+ 
+ [ Test plan ]
+ 
+ * Install a VM with the latest Ubuntu 24.04
+    $ kvm-test --install --iso /srv/iso/ubuntu-24.04.4-live-server-amd64.iso
+ * Boot the guest, install multipath-tools-boot
+    $ kvm-test --boot
+    (guest) $ sudo apt install multipath-tools-boot
+ * Remove the /etc/multipath/bindings file (to simulate the image building 
environment) then regenerate the initramfs
+    (guest) $ sudo rm /etc/multipath/bindings
+    (guest) $ sudo update-initramfs -u
+ * Restart the guest, and interrupt grub by mashing the "e" key
+ * Add the "break=top" kernel argument, then hit ctrl-x to continue the boot 
process
+ * Once in the initramfs shell, run the following command:
+    $ modprobe dm-multipath
+    $ scripts/init-top/multipath
+ * Now ensure that multipathd is actually running:
+    $ ps | grep multipath
+ 
+ One can find kvm-test in ppa:ogayot/subiquity or at
+ https://github.com/canonical/subiquity/blob/main/scripts/kvm-test.py
+ 
+ [ Where problems could occur ]
+ 
+ * The change in multipath-tools-boot will affect all installations using
+ multipath. However, a single call to multipath (in dry-run mode)
+ immediately before the actual call to multipathd should be harmless. If
+ the bindings file already exists (which should be the case for everyone
+ except for the installer ISOs), the command should exit very quickly.
+ The delay it would introduce should be negligible.
+ 
+ [ Other info ]
+ 
+ This is needed in conjunction with bug 2080474. The associated MP has
+ both fixes included.

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

Title:
  [SRU] multipathd fails to start in Ubuntu installer's initramfs (no
  bindings file)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/2120444/+subscriptions


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

Reply via email to