Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 955070 - sys-fs/xfsprogs: xfs_scrub_all needs dev-python/dbus-python
Summary: sys-fs/xfsprogs: xfs_scrub_all needs dev-python/dbus-python
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-29 11:47 UTC by Stefan Schmid
Modified: 2025-04-29 18:47 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Schmid 2025-04-29 11:47:22 UTC
The tool "/usr/sbin/xfs_scrub_all" requires the Python module "dbus" from the package "dev-python/dbus-python" to work, but the package is not included in the dependencies of "sys-fs/xfsprogs".

Reproducible: Always

Steps to Reproduce:
1. Run the service unit "xfs_scrub_all.service" without "dev-python/dbus-python" installed.
Actual Results:  
Apr 29 13:25:55 alpha01 systemd[1]: Starting Online XFS Metadata Check for All Filesystems...
Apr 29 13:25:55 alpha01 xfs_scrub_all[1067714]: Traceback (most recent call last):
Apr 29 13:25:55 alpha01 xfs_scrub_all[1067714]:   File "/usr/sbin/xfs_scrub_all", line 18, in <module>
Apr 29 13:25:55 alpha01 xfs_scrub_all[1067714]:     import dbus
Apr 29 13:25:55 alpha01 xfs_scrub_all[1067714]: ModuleNotFoundError: No module named 'dbus'
Apr 29 13:25:55 alpha01 systemd[1]: xfs_scrub_all.service: Main process exited, code=exited, status=1/FAILURE
Apr 29 13:25:55 alpha01 systemd[1]: xfs_scrub_all.service: Failed with result 'exit-code'.
Apr 29 13:25:55 alpha01 systemd[1]: Failed to start Online XFS Metadata Check for All Filesystems.
Apr 29 13:25:55 alpha01 systemd[1]: xfs_scrub_all.service: Triggering OnFailure= dependencies.

Expected Results:  
Apr 29 13:30:19 alpha01 systemd[1]: Starting Online XFS Metadata Check for All Filesystems...
Apr 29 13:30:19 alpha01 xfs_scrub_all[1074405]: Automatically enabling file data scrub.
Apr 29 13:30:19 alpha01 xfs_scrub_all[1074405]: Scrubbing /...
Apr 29 13:30:22 alpha01 xfs_scrub_all[1074405]: Scrubbing / done, (err=0)
Apr 29 13:30:24 alpha01 systemd[1]: xfs_scrub_all.service: Deactivated successfully.
Apr 29 13:30:24 alpha01 systemd[1]: Finished Online XFS Metadata Check for All Filesystems.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-04-29 16:58:25 UTC
Wonder how best to fix this. Feels unfortunate to introduce a dep on something quite fundamental when only the systemd unit needs it.
Comment 3 Mike Gilbert gentoo-dev 2025-04-29 17:44:25 UTC
Yeah, I hesitate to depend on it unconditionally for something many people will never use.

Maybe an optfeature message?
Comment 4 Stefan Schmid 2025-04-29 18:15:54 UTC
(In reply to Sam James from comment #2)
> Wonder how best to fix this. Feels unfortunate to introduce a dep on
> something quite fundamental when only the systemd unit needs it.

Why should this be a systemd problem? Is the "/usr/sbin/xfs_scrub_all" tool only used in a systemd unit?
Comment 5 Mike Gilbert gentoo-dev 2025-04-29 18:36:50 UTC
It's not systemd-only. However, I suspect few people actually run xfs_scrub_all.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-04-29 18:42:52 UTC
Sorry, I thought that script was only used by the service. I thought also that the script was systemd-only, but it isn't:

		# Run per-mount systemd xfs_scrub service only if we ourselves
		# are running as a systemd service.
		if 'SERVICE_MODE' in os.environ:
			ret = run_service(mnt, scrub_media, killfuncs)
			if ret == 0 or ret == 1:
				print("Scrubbing %s done, (err=%d)" % (mnt, ret))
				sys.stdout.flush()
				retcode |= ret
				return

			if terminate:
				return

		# Invoke xfs_scrub manually if we're running in the foreground.
		# We also permit this if we're running as a cronjob where
		# systemd services are unavailable.
		ret = run_subprocess(mnt, scrub_media, killfuncs)
		if ret >= 0:

Just the dbus functionality (and service functionality) is. Nonetheless, it's niche.
Comment 7 Stefan Schmid 2025-04-29 18:47:28 UTC
For non-systemd systems, there is a cron file:
/usr/share/xfsprogs/xfs_scrub_all.cron

And just like the timer unit, this isn't enabled by default, so few users use it.