Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore XFS mountpoints in CageFS skeleton #84

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

prilr
Copy link
Collaborator

@prilr prilr commented Jul 18, 2023

CloudLinux CageFS mountpoints can sometimes cause problems with the XFS scanner actor. An example:

2023-07-05 19:39:39.111 DEBUG    PID: 11761 leapp.workflow.FactsCollection.xfs_info_scanner: External command has started: ['/usr/sbin/xfs_info', '/usr/share/cagefs-skeleton/var/www/cgi-bin\\040(deleted)']
2023-07-05 19:39:39.117 DEBUG    PID: 11761 leapp.workflow.FactsCollection.xfs_info_scanner: xfs_info: /usr/share/cagefs-skeleton/var/www/cgi-bin\040(deleted) is not a mounted XFS filesystem

CageFS mountpoints causing problems with the xfs_info utility can be safely skipped over instead of halting the actor and the upgrade process.

@github-actions
Copy link

Thank you for contributing to the Leapp project!

Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergable.
If you want to re-run tests or request review, you can use following commands as a comment:

  • leapp-ci build to run copr build and e2e tests in OAMG CI
  • review please to notify leapp developers of review request

Please open ticket in case you experience technical problem with the CI. (RH internal only)

Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please consider rerunning the CI by commenting leapp-ci build (might require several comments). If the problem persists, contact leapp-infra.

@andrewlukoshko andrewlukoshko merged commit 6f2f036 into AlmaLinux:almalinux Jul 18, 2023
1 check passed
@prilr prilr deleted the xfs-cagefs-ignore branch July 18, 2023 14:32
Copy link

@helldotcat helldotcat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

return False
try:
for l in run(['/usr/sbin/xfs_info', '{}'.format(mp)], split=True)['stdout']:
if 'ftype=0' in l:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe just return any('ftype=0' in line for line in run(['/usr/sbin/xfs_info', '{}'.format(mp)], split=True)['stdout'])

if 'ftype=0' in l:
return True
return False
# xfs_info can sometimes throw errors like the following if fed a CageFS mountpoint.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe better write "like the following one if it's given a CageFS mountpoint."

# xfs_info can sometimes throw errors like the following if fed a CageFS mountpoint.
# xfs_info: /usr/share/cagefs-skeleton/var/www/cgi-bin\040(deleted) is not a mounted XFS filesystem
except CalledProcessError as err:
if "cagefs" in mp:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if there is an invalid cagefs mount (let's say specified in cagefs.mp file) without cagefs in path? We are going to stop the elevation process and expecting customer to handle such a case by himself?

@helldotcat
Copy link

Your review was submitted on a merged pull request

Meh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants