LXD from snap and lxcfs

Hello,

I need lxcfs with that fix: https://github.com/lxc/lxcfs/issues/13

I migrated from LXD debs to LXD snap. But lxcfs is still installed as deb, with its systemd service:

# dpkg -l | grep lxc
ii  liblxc-common                         3.0.3-0ubuntu1~18.04.1                          amd64        Linux Containers userspace tools (common tools)
ii  liblxc1                               3.0.3-0ubuntu1~18.04.1                          amd64        Linux Containers userspace tools (library)
ii  lxcfs                                 3.0.3-0ubuntu1~18.04.1                          amd64        FUSE based filesystem for LXC
ii  python3-lxc                           3.0.1-0ubuntu1                                  amd64        Linux Containers userspace tools (Python 3.x bindings)

# lxcfs -h
Usage:

lxcfs [-f|-d] [-p pidfile] mountpoint
  -f running foreground by default; -d enable debug output 
  Default pidfile is /run/lxcfs.pid

But the lxcfs I want is provided by the Snap:

# /snap/lxd/current/bin/lxcfs -h
Usage:

lxcfs [-f|-d] -u -l -n [-p pidfile] mountpoint
  -f running foreground by default; -d enable debug output 
  -l use loadavg 
  -u no swap 
  Default pidfile is /run/lxcfs.pid
lxcfs -h

Is it intended ? Is it a bug ?

I try this without any success:

snap set lxd lxcfs.loadavg=true && systemctl reload snap.lxd.daemon

You may need a harder restart as we try very very hard not to restart lxcfs (it breaks all running containers).

A snap stop lxd may be enough to have lxcfs go away. Otherwise killing it and reloading the snap should force a respawn too.

1 Like

It worked, thanks.