Skip to content

fix: extra filesystems broken when bind-mounting host root in Docker - #1859

Merged
henrygd merged 2 commits into
henrygd:mainfrom
svenvg93:1857-possible-fix-for-docker-ef
Mar 30, 2026
Merged

henrygd merged 2 commits into
henrygd:mainfrom
svenvg93:1857-possible-fix-for-docker-ef

Conversation

@svenvg93

Copy link
Copy Markdown
Collaborator

📃 Description

When a user bind-mounts the host root (/) into /extra-filesystems/, disk.Partitions(all=true) (added in 6a207c33) exposes all nested virtual mounts from the host (/proc, /sys, /dev, etc.) under that path. The previous prefix check caused every one of these to be registered as an extra filesystem, producing dozens of unwanted entries and breaking custom labels.

Fix: match only direct children of /extra-filesystems/ using filepath.Dir instead of strings.HasPrefix.

Fixes #1857

📖 Documentation

Add a link to the PR for documentation changes.

🪵 Changelog

🔧 Fixed

  • Agent: bind-mounting host root into /extra-filesystems/ showed numerous unwanted disk partitions and lost custom labels after v0.18.6

@svenvg93
svenvg93 requested a review from henrygd as a code owner March 30, 2026 16:46

@henrygd henrygd left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Perfect, thanks for the quick fix!

@henrygd
henrygd merged commit 80135fd into henrygd:main Mar 30, 2026
1 check passed
@svenvg93
svenvg93 deleted the 1857-possible-fix-for-docker-ef branch March 30, 2026 17:51
@sashablue

sashablue commented Apr 7, 2026 •

Copy link
Copy Markdown
Contributor

Hi,
I am not a programmer, but I think this change broke reporting the disk size / free space of the root partition when using the agent in docker. It shows zero now. in 0.18.6 it worked.
image

If i add the root as extra filesystem, it shows:
image
but the root disk it's still reported as 0
image

Regards

rizkyilhampra pushed a commit to rizkyilhampra/beszel that referenced this pull request Apr 14, 2026
xiaoran7 pushed a commit to xiaoran7/beszel that referenced this pull request Oct 17, 2026
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.

[Bug]: v0.18.6 broke extra filesystem reporting

3 participants