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

leapp fails in reboot phase when a "nofail" mount point cannot be mounted

    • No
    • Moderate
    • 1
    • rhel-sst-upgrades
    • 12
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • Leapp: 9.8 & 10.2
    • None
    • None
    • None

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

      When /etc/fstab contains a mount point configured with nofail and the file system cannot be mounted, the leapp reboot phase will drop into emergency mode when execution mount -a:

      [   16.135542] localhost kernel: xfs filesystem being mounted at /boot supports timestamps until 2038 (0x7fffffff)
      [   16.326015] localhost kernel: XFS (vdb): Invalid superblock magic number
      [   16.258698] localhost upgrade[1170]: Process Process-188:
      [   16.258698] localhost upgrade[1170]: Traceback (most recent call last):
      [   16.258698] localhost upgrade[1170]:   File "/usr/lib64/python3.6/multiprocessing/process.py", line 258, in _bootstrap
      [   16.258698] localhost upgrade[1170]:     self.run()
      [   16.258698] localhost upgrade[1170]:   File "/usr/lib64/python3.6/multiprocessing/process.py", line 93, in run
      [   16.258698] localhost upgrade[1170]:     self._target(*self._args, **self._kwargs)
      [   16.258698] localhost upgrade[1170]:   File "/usr/lib/python3.6/site-packages/leapp/repository/actor_definition.py", line 74, in _do_run
      [   16.258698] localhost upgrade[1170]:     actor_instance.run(*args, **kwargs)
      [   16.258698] localhost upgrade[1170]:   File "/usr/lib/python3.6/site-packages/leapp/actors/__init__.py", line 289, in run
      [   16.258698] localhost upgrade[1170]:     self.process(*args)
      [   16.258698] localhost upgrade[1170]:   File "/etc/leapp/repos.d/system_upgrade/common/actors/removeupgradebootentry/actor.py", line 20, in process
      [   16.258698] localhost upgrade[1170]:     remove_boot_entry()
      [   16.258698] localhost upgrade[1170]:   File "/etc/leapp/repos.d/system_upgrade/common/actors/removeupgradebootentry/libraries/removeupgradebootentry.py", line 41, in remove_boot_entry
      [   16.258698] localhost upgrade[1170]:     '/bin/mount', '-a'
      [   16.258698] localhost upgrade[1170]:   File "/usr/lib/python3.6/site-packages/leapp/libraries/stdlib/__init__.py", line 192, in run
      [   16.258698] localhost upgrade[1170]:     result=result
      [   16.258698] localhost upgrade[1170]: leapp.libraries.stdlib.CalledProcessError: Command ['/bin/mount', '-a'] failed with exit code 32.
      [   16.298811] localhost upgrade[745]: 2024-08-27 13:13:55.331 ERROR    PID: 3 leapp.workflow.InitRamStart: Actor remove_upgrade_boot_entry has crashed: Traceback (most recent call last):
      [   16.298811] localhost upgrade[745]:   File "/usr/lib/python3.6/site-packages/leapp/repository/actor_definition.py", line 74, in _do_run
      [   16.298811] localhost upgrade[745]:     actor_instance.run(*args, **kwargs)
      [   16.298811] localhost upgrade[745]:   File "/usr/lib/python3.6/site-packages/leapp/actors/__init__.py", line 289, in run
      [   16.298811] localhost upgrade[745]:     self.process(*args)
      [   16.298811] localhost upgrade[745]:   File "/etc/leapp/repos.d/system_upgrade/common/actors/removeupgradebootentry/actor.py", line 20, in process
      [   16.298811] localhost upgrade[745]:     remove_boot_entry()
      [   16.298811] localhost upgrade[745]:   File "/etc/leapp/repos.d/system_upgrade/common/actors/removeupgradebootentry/libraries/removeupgradebootentry.py", line 41, in remove_boot_entry
      [   16.298811] localhost upgrade[745]:     '/bin/mount', '-a'
      [   16.298811] localhost upgrade[745]:   File "/usr/lib/python3.6/site-packages/leapp/libraries/stdlib/__init__.py", line 192, in run
      [   16.298811] localhost upgrade[745]:     result=result
      [   16.298811] localhost upgrade[745]: leapp.libraries.stdlib.CalledProcessError: Command ['/bin/mount', '-a'] failed with exit code 32.
      

      The reason for this is mount -a will exit in failure if a file system, even if marked with nofail (which is a systemd property).

      Please provide the package NVR for which bug is seen:

      leapp-repository RHEL7 and RHEL8

      How reproducible:

      Always

      Steps to reproduce

      1. Add a disk to a VM as /dev/vdb
      2. Create an entry in /etc/fstab
        /dev/vdb    /mnt    xfs    defaults,nofail 0   0
      3. Execute leapp upgrade

      Expected results

      Detection that something will be wrong on reboot
      or
      mount -a not failing during reboot phase

      Actual results

      mount -a failing during reboot phase

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

                Created:
                Updated: