Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-119788

After leapp upgrade, the system doesn't boot because it's waiting forever on "resume"

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-8.10, rhel-9.6
    • leapp-repository
    • None
    • rhel-upgrades
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      A customer has a disk layout where slash is on standard partition and swap on LVM partition:

      # lsblk
      NAME          MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
      sr0            11:0    1 1024M  0 rom  
      vda           252:0    0   20G  0 disk 
      ├─vda1        252:1    0    1G  0 part /boot
      ├─vda2        252:2    0    2G  0 part 
      │ └─rhel-swap 253:0    0    2G  0 lvm  [SWAP]
      └─vda3        252:3    0   10G  0 part /
      
      # cat /proc/cmdline 
      [...] resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/swap
      

      Upgrading the system from 8 to 9 (and probably 9 to 10 but didn't test) fails after the system was upgraded, because the initramfs waits on resume=/dev/mapper/rhel-swap which becomes never available, because the dracut module lvm is not embedded in the initramfs built while upgrading the kernel.
      The reason is because leapp executes the upgrade after doing mount -a, which doesn't mount the swap, see RHEL-119786.
      Due to not mounting the swap, dracut will not embed the lvm module, because of RHEL-119785.

      IMHO the only solution for now is to include swapon in the initramfs and perform a mount -a; swapon -a before executing the upgrade script.
      Unfortunately apparently there may be some issues with aarch64, as per comments in /usr/share/leapp-repository/repositories/system_upgrade/common/actors/commonleappdracutmodules/files/dracut/85sys-upgrade-redhat/do-upgrade.sh.

      EDIT: using swapon -a doesn't work probably because we are in a container:

      [   50.380415] upgrade[807]: swapon: /dev/mapper/rhel-swap: swapon failed: Operation not permitted
      

      Workaround: create a dracut drop-in to add the device:

      # echo "add_device+=\" $(grep -oP "resume=\K([^ ]*)" /proc/cmdline) \"" > /etc/dracut.conf.d/resume.conf
      

      What is the impact of this issue to you?

      Can't reboot on upgraded kernel without manually removing resume=xxx then rebuilding the initramfs after first boot.

      Please provide the package NVR for which the bug is seen:

      leapp-upgrade-el8toel9-0.22.0-1.el8_10.noarch

      How reproducible is this bug?:

      Always

      Steps to reproduce

      1. Install a RHEL8 system with slash on standard partition and swap on LVM
      2. Upgrade it

      Expected results

      Boots fine on upgraded kernel

      Actual results

      Hangs forever on upgraded kernel on "resume" module

              leapp-notifications leapp-notifications
              rhn-support-rmetrich Renaud Métrich
              leapp-notifications leapp-notifications
              RHEL Upgrades QE Team RHEL Upgrades QE Team
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: