Skip to content

needrestart 3.6 fails to detect LXD when installed as a snap on newer Ubuntu revisions #343

@MaxRower

Description

@MaxRower

Using needrestart 3.6 coming with Ubuntu 24.04 LTS and LXD 5.21.3.
As it fails to detect LXD, it wants to restart a container with "lxc-stop", which obviously fails.
In #26 (Commit e584a67) the detection for LXD was added, but this seems to check for /usr/bin/lxc and /var/lib/lxd/containers/$name, which do not exist here. It should check for /snap/bin/lxc as well, or maybe better search for lxc in $PATH, and /var/snap/lxd/common/lxd/containers/$name.
Since there is incus as well, it should be considered to make this configurable somewhere? Edit: incus seems already been implemented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions