Repository navigation
fix: support host memory accounting for Docker inside LXC - #3846
Merged
kmendell merged 1 commit intoSep 4, 2026
Merged
Conversation
| if err != nil { | ||
| return dockerHostMemoryInfo{}, err | ||
| } | ||
| if inspect.Container.ID != containerID || inspect.Container.HostConfig == nil || |
Contributor
There was a problem hiding this comment.
When CurrentContainerID falls back to a 12-character hostname or mountinfo ID, Docker accepts the abbreviated ID for inspection but returns the canonical 64-character ID. This exact comparison then rejects the current container and silently keeps the incorrect memory baseline that this PR intends to fix. The shared cgroup implementation explicitly permits 12-character IDs in cgroup/cgroup.go; normalize the detected ID or compare it with the returned full-ID prefix.
Prompt To Fix With AI
This is a comment left during a code review.
Path: backend/internal/system/memory.go
Line: 70
Comment:
**Short IDs Fail Validation**
When `CurrentContainerID` falls back to a 12-character hostname or mountinfo ID, Docker accepts the abbreviated ID for inspection but returns the canonical 64-character ID. This exact comparison then rejects the current container and silently keeps the incorrect memory baseline that this PR intends to fix. The shared cgroup implementation explicitly permits 12-character IDs in [`cgroup/cgroup.go`](https://github.com/getarcaneapp/sys/blob/HEAD/cgroup/cgroup.go#L393-L440); normalize the detected ID or compare it with the returned full-ID prefix.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.
Contributor
|
Container images for this PR have been built successfully!
Built from commit f10a6dd |
kmendell
force-pushed
the
fix_support_host_memory_accounting_for_docker_inside_lxc
branch
from
September 4, 2026 21:35
4badd0d to
f10a6dd
Compare
kmendell
deleted the
fix_support_host_memory_accounting_for_docker_inside_lxc
branch
September 4, 2026 21:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Checklist
mainbranchm.*())What This PR Implements
Fixes: #3741
Changes Made
Testing Done
AI Tool Used (if applicable)
Additional Context
Disclaimer Greptiles Reviews use AI, make sure to check over its work.
To better help train Greptile on our codebase, if the comment is useful and valid Like the comment, if its not helpful or invalid Dislike
To have Greptile Re-Review the changes, mention
greptileai.Greptile Summary
This PR adds host-memory accounting for Arcane running as Docker inside an LXC guest, integrates it into WebSocket system statistics, and updates the supporting Go modules.
Confidence Score: 4/5
The PR is not yet safe to merge because abbreviated container IDs can disable the intended fix, and the explicit repository testing requirement remains unsatisfied.
The new inspection gate compares a potentially abbreviated detected ID against Docker’s canonical full ID, causing valid deployments to retain incorrect memory statistics; the new platform-specific path also has no regression coverage.
Files Needing Attention: backend/internal/system/memory.go
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "fix: support host memory accounting for ..." | Re-trigger Greptile
Context used: