Skip to content

Kubernetes Devcontainer Template, Issues with CPU & Memory Agent Metadata #17

@greg-the-coder

Description

@greg-the-coder

I've encountered issues when using the Kubernetes Devcontainer template (https://github.com/coder/registry/blob/main/registry/coder/templates/kubernetes-devcontainer/main.tf) on AWS EKS/Linux Nodes, and SUSE/Rancher RKE Nodes where the Coder Agent CPU and Memory Metadata won't display properly. What I discovered is that the "coder stat cpu" and "coder stat mem" commands error out.

Here are examples from running the command in Kubernetes Devcontainer workspaces on AWS EKS using auto-mode and bottlerocket Node group:

*** cpu ***
coder@coder-7aa67e3d-df1b-4074-9379-e44ff309fcec-866f5bbb4c-2rk6j:/workspaces$ coder stat cpu
Encountered an error running "coder stat cpu", see "coder stat cpu --help" for more information
error: get total cpu: 2 errors occurred:
        * get cpu period: read /sys/fs/cgroup/cpu,cpuacct/cpu.cfs_period_us: open /sys/fs/cgroup/cpu,cpuacct/cpu.cfs_period_us: no such file or directory
        * get cpu period: read /sys/fs/cgroup/cpu/cpu.cfs_period_us: open /sys/fs/cgroup/cpu/cpu.cfs_period_us: no such file or directory

*** mem ***
coder@coder-7aa67e3d-df1b-4074-9379-e44ff309fcec-866f5bbb4c-2rk6j:/workspaces$ coder stat mem
Encountered an error running "coder stat mem", see "coder stat mem --help" for more information
error: read memory total: read /sys/fs/cgroup/memory/memory.limit_in_bytes: open /sys/fs/cgroup/memory/memory.limit_in_bytes: no such file or directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions