FS#76297 - [lxd] add an activateifneeded service

Attached to Project: Community Packages
Opened by Yuri Kanivetsky (x-yuri) - Wednesday, 26 October 2022, 09:42 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:09 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To George Rawlinson (rawlinsong)
Morten Linderud (Foxboron)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: I looked into how it works on Ubuntu. There the lxd service is not enabled. What is enabled is the matching socket. And there's an enabled service that runs `lxd activateifneeded` on boot:

https://github.com/lxc/lxd/blob/lxd-5.6/lxd/main_activateifneeded.go#L35-L42

Supposedly that's their idea of how it should work:

> By default, LXD is socket activated and configured to listen only on a local UNIX socket. While LXD may not be running when you first look at the process listing, any LXC command will start it up.

https://ubuntu.com/server/docs/containers-lxd

My suggestion is to add a service:

/etc/systemd/system/lxd-activateifneeded.service

[Unit]
Description=LXD (activateifneeded)

[Service]
ExecStart=/usr/bin/lxd activateifneeded
Type=oneshot

[Install]
WantedBy=multi-user.target

Then after installation, one starts/enables lxd.socket, and optionally enables lxd-activateifneeded.service.

A possibly related bug report:

 FS#72614 

But it doesn't manifest on my machine.
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:09 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/lxd/issues/3
Comment by G3ro (G3ro) - Wednesday, 26 October 2022, 19:51 GMT

Loading...