Indeed, the processes getting stuck was due to the stock LXD that I forgot to remove.
What confused me, is that I could not get
lxd init to run, if the command line was
sudo -E $GOPATH/bin/lxd --group sudo init
ubuntu@lxd:~$ sudo -E $GOPATH/bin/lxd --group sudo init
WARN[01-30|22:59:51] CGroup memory swap accounting is disabled, swap limits will be ignored.
(stays here until I Ctrl+C)
ubuntu@lxd:~$ sudo -E $GOPATH/bin/lxd init
!!! Running init for you!
error: Unable to talk to LXD: Get http://unix.socket/1.0: dial unix /var/lib/lxd/unix.socket: connect: no such file or directory
The text !!!Running init for you! is a print statement I put in lxd/lxd/main_init.go:func cmdInit()
What happens, is the the parser for the command line options expects the subcommand (i.e.
init) to come first, and then any flags such as
--group sudo in this case. However, if
init is first, then
--group sudo is not evaluated soon and
init runs without proper group permissions (and fails).
I filed a bug report on this,