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

leapp backtraces when having both /var/tmp and /var_tmp mounts

    • No
    • Moderate
    • None
    • False
    • Hide

      None

      Show
      None
    • Yes
    • Red Hat Enterprise Linux
    • None
    • None
    • None
    • Unspecified Release Note Type - Unknown
    • None

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

      When a customer has XFS mount points that get "escaped" to be mounted as overlays, e.g. /var/tmp and /var_tmp, there is collision on the escape character (which is underscore), causing the following backtrace to be encountered:

      MountError: Mount operation with mode loop from /var/lib/leapp/scratch/diskimages/root_var_tmp to /var/lib/leapp/scratch/mounts/root_var_tmp failed: Command ['mount', '-o', 'loop', '/var/lib/leapp/scratch/diskimages/root_var_tmp', '/var/lib/leapp/scratch/mounts/root_var_tmp'] failed with exit code 32.
      

      What is the impact of this issue to you?

      Prevents leapping

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

      leapp-upgrade-el7toel8-0.20.0-9.el7_9.noarch

      How reproducible is this bug?:

      Always

      Steps to reproduce

      1. Add a disk to host 2 file systems, /var/tmp and a /var_tmp
        # vgcreate data /dev/vdb
        # lvcreate -n tmp -L 1G data
        # lvcreate -n var_tmp -L 1G data
        # mkfs.xfs /dev/data/tmp
        # mkfs.xfs /dev/data/var_tmp
        
      2. Add the file systems in /etc/fstab
        # mkdir /var_tmp
        # echo "/dev/mapper/data-tmp    /var/tmp    xfs    defaults    0 0" >> /etc/fstab
        # echo "/dev/mapper/data-var_tmp    /var_tmp    xfs    defaults    0 0" >> /etc/fstab
        # systemctl daemon-reload
        # mount -a
        
      3. Execute leapp upgrade

      Expected results

      No backtrace

      Actual results

      Backtrace when creating the userspace:

      ====> * target_userspace_creator
              Initializes a directory to be populated as a minimal environment to run binaries from the target system.
      Process Process-543:
      Traceback (most recent call last):
        File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
          self.run()
        File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
          self._target(*self._args, **self._kwargs)
        File "/usr/lib/python2.7/site-packages/leapp/repository/actor_definition.py", line 74, in _do_run
          actor_instance.run(*args, **kwargs)
        File "/usr/lib/python2.7/site-packages/leapp/actors/__init__.py", line 289, in run
          self.process(*args)
        File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/targetuserspacecreator/actor.py", line 58, in process
          userspacegen.perform()
        File "/usr/lib/python2.7/site-packages/leapp/utils/deprecation.py", line 42, in process_wrapper
          return target_item(*args, **kwargs)
        File "/usr/share/leapp-repository/repositories/system_upgrade/common/actors/targetuserspacecreator/libraries/userspacegen.py", line 1259, in perform
          scratch_reserve=reserve_space) as overlay:
        File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
          return self.gen.next()
        File "/usr/share/leapp-repository/repositories/system_upgrade/common/libraries/overlaygen.py", line 589, in create_source_overlay
          with _build_overlay_mount(root_overlay, mounts) as overlay:
        File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
          return self.gen.next()
        File "/usr/share/leapp-repository/repositories/system_upgrade/common/libraries/overlaygen.py", line 311, in _build_overlay_mount
          with _build_overlay_mount(root_mount, mounts) as mount:
        File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
          return self.gen.next()
        File "/usr/share/leapp-repository/repositories/system_upgrade/common/libraries/overlaygen.py", line 307, in _build_overlay_mount
          with current_mount:
        File "/usr/share/leapp-repository/repositories/system_upgrade/common/libraries/mounting.py", line 362, in __enter__
          self.mount()
        File "/usr/share/leapp-repository/repositories/system_upgrade/common/libraries/mounting.py", line 337, in mount
          self._create()
        File "/usr/share/leapp-repository/repositories/system_upgrade/common/libraries/mounting.py", line 353, in _create
          details=None)
      MountError: Mount operation with mode loop from /var/lib/leapp/scratch/diskimages/root_var_tmp to /var/lib/leapp/scratch/mounts/root_var_tmp failed: Command ['mount', '-o', 'loop', '/var/lib/leapp/scratch/diskimages/root_var_tmp', '/var/lib/leapp/scratch/mounts/root_var_tmp'] failed with exit code 32.
      

              Unassigned Unassigned
              rhn-support-rmetrich Renaud Métrich
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: