openwrt / openwrt/procd

OpenWRT in LXC: procd not respecting lxcfs bind mount.

Open
#18 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
11
Forks
40
PR merge metrics
No merged PRs in 30d

Description

Trying to figure out a path forward to get OpenWRT running in an LXC container on proxmox and have it report the correct memory/swap/uptime/etc values pulled from /proc.

see: https://www.reddit.com/r/Proxmox/comments/1gbgrky/openwrt_vm_memory_readings_waaaaay_off_and/ for the effect.

On the latest versions of proxmox, lxcfs should be automatically mounted to /proc in any container. I can see this when logged in to SSH because cat /proc/meminfo returns the values I'd expect to see in the contianer (2g ram) but ubus call system info reports the 92GB of my server.

I apologize, I'm not familiar with how this is put together, but I've been doing some digging through the code. I suspect that we're dealing with a race condition where procd is iniitalizing before the bind mount is complete, opening the file handle, and then keeping it open. I could be way off, though. Any assistance would be appreciated.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing cat /proc/meminfo with ubus call system info in the OpenWrt LXC container, then trace the procd initialization path and how it reads /proc. Done means procd reports the container's memory, swap, and uptime values after the lxcfs bind mount is present.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.