Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 817287 - app-containers/lxd: Fails to start due to missing /var/log/lxd
Summary: app-containers/lxd: Fails to start due to missing /var/log/lxd
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Joonas Niilola
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-10 02:20 UTC by Uzi Erdenebileg
Modified: 2022-02-02 08:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge--info,5.65 KB, text/plain)
2021-10-10 02:39 UTC, Uzi Erdenebileg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Uzi Erdenebileg 2021-10-10 02:20:53 UTC
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).
Comment 1 Uzi Erdenebileg 2021-10-10 02:24:18 UTC
I created https://github.com/gentoo/gentoo/pull/22535 that fixes this.
Comment 2 Uzi Erdenebileg 2021-10-10 02:39:18 UTC
Created attachment 744207 [details]
emerge --info

output from emerge --info command
Comment 3 Larry the Git Cow gentoo-dev 2021-10-10 06:29:15 UTC
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(+)
Comment 4 Joonas Niilola gentoo-dev 2022-01-09 08:32:31 UTC
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.
Comment 5 Larry the Git Cow gentoo-dev 2022-02-02 08:53:12 UTC
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(+)