Cloudron `/system/filesystems` fails with LUKS device alias
-
The Cloudron dashboard does not show disk usage (not in v10.0.2 nor earlier versions for at least a year). The request to:
/api/v1/system/filesystemsreturns:
{ "status": "Internal Server Error", "message": "Cannot read properties of undefined (reading 'contents')" }Environment
- Cloudron: 10.0.2
- Ubuntu: 24.04.2 LTS
- Kernel: 6.8.0-111-generic
- Hosting: Hetzner
- Storage layout: NVMe → mdadm RAID1 → LUKS → ext4
The root filesystem itself is healthy and reports usage correctly:
Filesystem Type 1B-blocks Used Avail Use% Mounted on /dev/mapper/luks-a7030049-5aad-45e0-915c-3073a14fb4ac ext4 1883388502016 1367907303424 419734818816 77% /Box error
The Box log contains:
shell: df: df -B1 --output=source,fstype,size,used,avail,pcent,target shell: df: df -B1 --output=source,fstype,size,used,avail,pcent,target /home/yellowtent/platformdata { path: '/api/v1/system/filesystems', status: 500, error: HttpError: Cannot read properties of undefined (reading 'contents') at getFilesystems (file:///home/yellowtent/box/src/routes/system.js:153:28) { status: 500, internalError: TypeError: Cannot read properties of undefined (reading 'contents') at Object.getFilesystems (file:///home/yellowtent/box/src/system.js:112:42), details: null } }The relevant code in
/home/yellowtent/box/src/system.jsis:for (const stdPath of standardPaths) { const [dfPathError, diskInfo] = await safe(df.file(stdPath.path)); if (dfPathError) throw new BoxError(BoxError.FS_ERROR, `Error getting std path: ${dfPathError.message}`); filesystems[diskInfo.filesystem].contents.push(stdPath); }Apparent cause
The two
dfinvocations identify the same root device using different names.An unqualified
dfreports:/dev/dm-0 ext4 ... /A path-specific
dfreports:/dev/mapper/luks-a7030049-5aad-45e0-915c-3073a14fb4ac ext4 ... /These are aliases for the same device:
/dev/mapper/luks-a7030049-5aad-45e0-915c-3073a14fb4ac → /dev/dm-0It appears that Cloudron initially indexes
filesystemsusing the literal source returned by the unqualifieddf:filesystems[dfEntry.filesystem] = ...It then looks up the path-specific result using the other device alias:
filesystems[diskInfo.filesystem].contents.push(stdPath);As a result,
filesystems[diskInfo.filesystem]is undefined and the API throws while accessing.contents.It may be necessary to normalize device paths before using them as keys, or fall back to matching by mountpoint/device identity.
Has anyone else encountered this with an mdadm + LUKS root filesystem? Is a fix planned for an upcoming Cloudron release?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login