Bug 2155661

Summary: leapp xfs_info_scanner fails when fstab xfs entry not mounted
Product: Red Hat Enterprise Linux 8 Reporter: Radek Duda <rduda>
Component: leapp-repositoryAssignee: Petr Stodulka <pstodulk>
Status: CLOSED ERRATA QA Contact: Martin KlusoĊˆ <mkluson>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.8CC: mmacura
Target Milestone: rcKeywords: Regression, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: leapp-repository-0.18.0-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-16 08:37:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
fstab file and leapp preupgrade output none

Description Radek Duda 2022-12-21 19:02:12 UTC
Created attachment 1934005 [details]
fstab file and leapp preupgrade output

Description of problem:
If /etc/fstab entry is not mounted, xfs_info_scanner fails. The rest of leapp checks is skipped.

Version-Release number of selected component (if applicable):
# rpm -qa leapp*
leapp-upgrade-el8toel9-0.17.0-5.el8.noarch
leapp-upgrade-el8toel9-deps-0.17.0-5.el8.noarch
leapp-deps-0.15.0-2.el8.noarch
leapp-0.15.0-2.el8.noarch

xfsprogs-5.0.0-10.el8.x86_64


How reproducible:
always

Steps to Reproduce:
1. Have xfs device and corresponding entry in /etc/fstab
(e.g. /dev/loop0 /foo xfs defaults,nofail,noauto 0 0)
2. run `leapp preupgrade`
3.

Actual results:
leapp xfs_info_scanner fails with exit code 1. Rest of leapp checks is skipped and leapp ends.

Expected results:
xfs_info_scanner does not fail.

Additional info:
====> * xfs_info_scanner
        This actor scans all mounted mountpoints for XFS information
Process Process-201:
Traceback (most recent call last):
  File "/usr/lib64/python3.6/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/lib64/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.6/site-packages/leapp/repository/actor_definition.py", line 72, in _do_run
    actor_instance.run(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/leapp/actors/__init__.py", line 289, in run
    self.process(*args)
  File "/etc/leapp/repos.d/system_upgrade/common/actors/xfsinfoscanner/actor.py", line 23, in process
    scan_xfs()
  File "/etc/leapp/repos.d/system_upgrade/common/actors/xfsinfoscanner/libraries/xfsinfoscanner.py", line 45, in scan_xfs
    mountpoints_ftype0 = list(filter(is_xfs_without_ftype, mountpoints))
  File "/etc/leapp/repos.d/system_upgrade/common/actors/xfsinfoscanner/libraries/xfsinfoscanner.py", line 24, in is_xfs_without_ftype
    for l in run(['/usr/sbin/xfs_info', '{}'.format(mp)], split=True)['stdout']:
  File "/usr/lib/python3.6/site-packages/leapp/libraries/stdlib/__init__.py", line 188, in run
    result=result
leapp.libraries.stdlib.CalledProcessError: Command ['/usr/sbin/xfs_info', '/foo'] failed with exit code 1.

Comment 1 Radek Duda 2022-12-21 19:03:16 UTC
Can not reproduce in rhel7

Comment 2 Petr Stodulka 2023-02-03 11:23:08 UTC
The fix has been merged in upstrea, the issue is going to be fixed with the next release:
    https://github.com/oamg/leapp-repository/pull/1027

Comment 10 errata-xmlrpc 2023-05-16 08:37:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (leapp-repository bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:2839