Open bravosierrasierra opened 3 months ago
I noticed the same issue under a privileged podman container / cloud hosted netbird
Maybe a good solution here would be to add a small function to detect if netbird
is running in a container (query /proc/1/cgroup
) - & if so skip the daemon check when querying status
Describe the problem
Can not access to netbird daemon from outside docker container. Daemon successfully started and registered in mesh with docker compose up -d
But i am can not access to daemon stats and routes:
$ docker compose exec netbird_client netbird --daemon-addr=unix:///var/run/netbird.sock status Error: failed to connect to daemon error: context deadline exceeded If the daemon is not running please run: netbird service install netbird service start
$ docker compose exec netbird_client ls -laF /var/run/ total 8 drwxr-xr-x 2 root root 4096 Jun 18 15:37 ./ drwxr-xr-x 1 root root 4096 Jul 29 14:48 ../ ubuntu@netbird-gw-dev-dc-01 .../docker-compose/netbird $
To Reproduce
use "docker compose up -d" and then "docker compose exec netbird_client netbird status" with this docker-compose.yaml:
Expected behavior
netbird status should be fetched and printed
Are you using NetBird Cloud?
self-host NetBird's control plane
NetBird version
latest, 0.28.4, 0.27.7