canonical / lxd

Powerful system container and virtual machine manager
https://canonical.com/lxd
GNU Affero General Public License v3.0
4.32k stars 928 forks source link

Add ArchLinux support to lxd.migrate #12169

Open stgraber opened 6 years ago

stgraber commented 6 years ago

ArchLinux has a native LXD package through AUR so it'd be nice if lxd.migrate would work on there. From the top of my head, what we'd need is:

Note that I'm not myself familiar with Arch, so it'd be great if someone could contribute this piece.

Reported by @lenucksi

C0rn3j commented 5 years ago

Would love to see this feature. Note that the comments below are result of discussing this with the maintainer of AUR/lxd, but should also apply for AUR/lxd-git as AUR/lxd recently rebased on the git package.

Arch-specific code for figuring out what packages to remove and how to interact with the package manager

systemctl disable --now lxd, pacman -R lxd (with --noconfirm for automation). If the package was removed without disabling the service, there might be a lingering symlink in /etc/systemd/system/multi-user.wants/lxd.service

Maikel, [23.12.18 14:41]
to be very complete:
systemctl disable lxd.socket
systemctl disable lxd.service
systemctl stop lxd.socket
systemctl stop lxd.service

and if user has any of the example network configs (netctl/dnsmasq) in place, they might need to be removed as well (not sure if they are usable with snap version of lxd or conflict)

This should however pop up as instructions, rather than automatically uninstalling the package and messing with services/configs, as this is Arch.

I suggest touching up https://wiki.archlinux.org/index.php/LXD#Uninstall , which I just created, to be migration-friendly after lxd.migrate is functioning, and adding info on how to migrate here with linking to the Uninstall section. https://wiki.archlinux.org/index.php/LXD#Alternative_installation_method

Potentially Arch-specific for the systemd units if they don't match up with what we have in Ubuntu

Maikel, [23.12.18 14:33]
afaik we dont do any customization, all default paths are used
Maikel, [23.12.18 14:55]
i've recently rebased lxd on lxd-git so the service files and behaviour should be the same

Let me know if you need any more info.