fix: skip containerd mountinfo marker on WSL2 to avoid false-positive… - #51968
fix: skip containerd mountinfo marker on WSL2 to avoid false-positive…#51968Ulaganathan-K-B wants to merge 1 commit into
Conversation
… container detection On WSL2 with Docker Desktop, the WSL2 kernel's /proc/self/mountinfo contains containerd entries even when running natively (not inside any container). The is_container() cgroup-v2 fallback scanned mountinfo for 'containerd' as a marker, producing false positives. Real containers inside WSL are still detected via /.dockerenv, KUBERNETES_SERVICE_HOST, and /proc/1/cgroup checks earlier in the chain. On WSL, only kubepods/crio markers in mountinfo indicate a real container. Fixes NousResearch#51935
Duplicate of #51935 — same |
|
Thanks for preserving the existing Kubernetes/CRI mountinfo signals while addressing the WSL-specific false-positive path. Current The discussion-linked #51935 is not an equivalent implementation: its diff returns before inspecting any WSL mountinfo markers, whereas this PR retains Automated hermes-sweeper review. |
… container detection
On WSL2 with Docker Desktop, the WSL2 kernel's /proc/self/mountinfo contains containerd entries even when running natively (not inside any container). The is_container() cgroup-v2 fallback scanned mountinfo for 'containerd' as a marker, producing false positives.
Real containers inside WSL are still detected via /.dockerenv, KUBERNETES_SERVICE_HOST, and /proc/1/cgroup checks earlier in the chain. On WSL, only kubepods/crio markers in mountinfo indicate a real container.
Fixes #51935
What does this PR do?
Related Issue
Fixes #
Type of Change
Changes Made
How to Test
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AFor New Skills
hermes --toolsets skills -q "Use the X skill to do Y"Screenshots / Logs