I'm on current xenial, lxd version is 0.23, which you confirmed had this issue:
$ lxc --version
0.23
I created a wily and xenial container:
$ lxc launch images:ubuntu/wily/amd64 w1
$ lxc launch images:ubuntu/xenial/amd64 x1
"lxc stop" works for both w1 and x1. When I follow (-f) the journal in a container with
$ lxc exec x1 -- journalctl -f
before "stop", it starts with
Dec 01 05:47:43 w1 systemd[1]: Received SIGPWR.
Dec 01 05:47:43 w1 systemd[1]: Failed to reset devices.list on /lxc/w1/system.slice/sigpwr-container-shutdown.service: Permission denied
Dec 01 05:47:43 w1 systemd[1]: Starting Shut down containers on SIGPWR...
and then a lot of shutdown messages. I suppose your journal output in comment #6 was from *after* you did "lxc stop"? If not, please re-send it.
Let's check for you that everything is in place. Can you please copy&paste the output of
$ lxc exec test -- ls -l /lib/systemd/system/sigpwr.target.wants/sigpwr-container-shutdown.service /lib/systemd/system/sigpwr-container-shutdown.service
$ lxc exec test -- systemd-detect-virt
and then *after* running "lxc stop", the output of
$ lxc exec test -- systemctl status -l sigpwr-container-shutdown.service
I'm on current xenial, lxd version is 0.23, which you confirmed had this issue:
$ lxc --version
0.23
I created a wily and xenial container: ubuntu/ wily/amd64 w1 ubuntu/ xenial/ amd64 x1
$ lxc launch images:
$ lxc launch images:
"lxc stop" works for both w1 and x1. When I follow (-f) the journal in a container with
$ lxc exec x1 -- journalctl -f
before "stop", it starts with
Dec 01 05:47:43 w1 systemd[1]: Received SIGPWR. system. slice/sigpwr- container- shutdown. service: Permission denied
Dec 01 05:47:43 w1 systemd[1]: Failed to reset devices.list on /lxc/w1/
Dec 01 05:47:43 w1 systemd[1]: Starting Shut down containers on SIGPWR...
and then a lot of shutdown messages. I suppose your journal output in comment #6 was from *after* you did "lxc stop"? If not, please re-send it.
Let's check for you that everything is in place. Can you please copy&paste the output of
$ lxc exec test -- ls -l /lib/systemd/ system/ sigpwr. target. wants/sigpwr- container- shutdown. service /lib/systemd/ system/ sigpwr- container- shutdown. service
$ lxc exec test -- systemd-detect-virt
and then *after* running "lxc stop", the output of
$ lxc exec test -- systemctl status -l sigpwr- container- shutdown. service
Thanks!