LXD fails to start due to missing directory /var/log/lxd. If I create /var/log/lxd directory by hand, LXD starts succesfully. Reproducible: Always Steps to Reproduce: 1. emerge app-emulation/lxd 2. systemctl start lxd Actual Results: LXD fails to start (systemctl start lxd command appears to hang). Upon looking at output from journalctl -u lxd command, LXD fails to start due to missing directory. Output: Oct 10 09:47:30 hostname systemd[1]: Starting LXD - main daemon... Oct 10 09:47:30 hostname lxd[125305]: Error: Log file path doesn't exist: /var/log/lxd Oct 10 09:47:30 hostname systemd[1]: lxd.service: Main process exited, code=exited, status=1/FAILURE Expected Results: A running LXD. Adding a line keepdir /var/log/lxd should easily fix this (I've looked at LXC's ebuild as an example, it has a keepdir line that seem to create /var/log/lxc directory).
I created https://github.com/gentoo/gentoo/pull/22535 that fixes this.
Created attachment 744207 [details] emerge --info output from emerge --info command
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1aa6efcee944c0751b1c58a23ce79022d466124b commit 1aa6efcee944c0751b1c58a23ce79022d466124b Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2021-10-10 06:25:13 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2021-10-10 06:28:56 +0000 app-emulation/lxd: add fowners for the keepdir Bug: https://bugs.gentoo.org/817287 Signed-off-by: Joonas Niilola <juippis@gentoo.org> app-emulation/lxd/{lxd-4.0.7-r1.ebuild => lxd-4.0.7-r2.ebuild} | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27b61b8cd8a74129fa0c6dc0addbb02e12732735 commit 27b61b8cd8a74129fa0c6dc0addbb02e12732735 Author: Uzi Erdenebileg <lzijbuan@gmail.com> AuthorDate: 2021-10-10 06:22:14 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2021-10-10 06:28:44 +0000 app-emulation/lxd: Add keepdir Bug: https://bugs.gentoo.org/817287 Signed-off-by: Uzi Erdenebileg <lzijbuan@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/22535 Signed-off-by: Joonas Niilola <juippis@gentoo.org> app-emulation/lxd/lxd-4.0.7-r1.ebuild | 2 ++ 1 file changed, 2 insertions(+)
And just to kind of remind myself / anyone else why this bug is still open: This should be controlled via the init.d/service files and not the ebuild itself.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5bd04ef5dc1514fe99e65550f7e72bcf7ab993eb commit 5bd04ef5dc1514fe99e65550f7e72bcf7ab993eb Author: Joonas Niilola <juippis@gentoo.org> AuthorDate: 2022-02-02 08:45:41 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2022-02-02 08:53:06 +0000 app-containers/lxd: add 4.0.9 - inherit go-module.eclass; upstream uses go.mod now, - new documentation offered by upstream, e.g. a handy cheatsheet, - openrc init file and systemd service file now manages the log directory (#817287), - virtfs-proxy-helper bin path isn't hardcoded anymore (#798924), - -Werror patch turned into sed for easier maintainability. Bug: https://bugs.gentoo.org/798924 Closes: https://bugs.gentoo.org/817287 Signed-off-by: Joonas Niilola <juippis@gentoo.org> app-containers/lxd/Manifest | 2 + app-containers/lxd/files/lxd-4.0.9.initd | 49 ++++++++ app-containers/lxd/files/lxd-4.0.9.service | 25 +++++ app-containers/lxd/lxd-4.0.9.ebuild | 174 +++++++++++++++++++++++++++++ 4 files changed, 250 insertions(+)