Master/slave pacemaker cluster of LXD servers

Hi,
I am trying to create a master/slave pacemaker+corosync+drbd cluster. How is it possible to disable the LXD services to start automatically on the server reboot? I tried to disable the lxd.service, lxd.socket, and lxcfs.service but it didn’t help.
Thank you in advance.

Snap or not snap?

Disabling lxd.service and lxd.socket for the deb version should be enough, for the snap you have a different set though, likely snap.lxd.daemon.service, snap.lxd.daemon.unix.socket and snap.lxd.daemon.activate.service.

Unfortunately, disabling of lxd.service and lxd.socket doesn’t help. I have Ubuntu server 18.04.3 and LXD 3.0.3

# systemctl stop lxd-containers.service lxd.socket lxd.service
# systemctl disable lxd-containers.service lxd.socket lxd.service
Synchronizing state of lxd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable lxd

# systemctl daemon-reload 

# systemctl status lxd-containers.service lxd.socket lxd.service
● lxd-containers.service - LXD - container startup/shutdown
   Loaded: loaded (/lib/systemd/system/lxd-containers.service; disabled; vendor preset: enabled)
   Active: inactive (dead) since Wed 2019-11-13 16:29:08 IST; 48s ago
     Docs: man:lxd(1)
 Main PID: 1501 (code=exited, status=0/SUCCESS)

● lxd.socket - LXD - unix socket
   Loaded: loaded (/lib/systemd/system/lxd.socket; disabled; vendor preset: enabled)
   Active: inactive (dead) since Wed 2019-11-13 16:29:08 IST; 48s ago
     Docs: man:lxd(1)
   Listen: /var/lib/lxd/unix.socket (Stream)

● lxd.service - LXD - main daemon
   Loaded: loaded (/lib/systemd/system/lxd.service; indirect; vendor preset: enabled)
   Active: inactive (dead) since Wed 2019-11-13 16:29:08 IST; 48s ago
     Docs: man:lxd(1)
 Main PID: 1805 (code=exited, status=0/SUCCESS)

#reboot
# systemctl status lxd-containers.service lxd.socket lxd.service
● lxd-containers.service - LXD - container startup/shutdown
   Loaded: loaded (/lib/systemd/system/lxd-containers.service; disabled; vendor preset: enabled)
   Active: active (exited) since Wed 2019-11-13 16:31:07 IST; 38s ago
     Docs: man:lxd(1)
  Process: 1463 ExecStart=/usr/bin/lxd activateifneeded (code=exited, status=0/SUCCESS)
 Main PID: 1463 (code=exited, status=0/SUCCESS)

Nov 13 16:30:50 cpbxmt-a systemd[1]: Starting LXD - container startup/shutdown...
Nov 13 16:31:07 cpbxmt-a systemd[1]: Started LXD - container startup/shutdown.

● lxd.socket - LXD - unix socket
   Loaded: loaded (/lib/systemd/system/lxd.socket; disabled; vendor preset: enabled)
   Active: active (running) since Wed 2019-11-13 16:30:48 IST; 57s ago
     Docs: man:lxd(1)
   Listen: /var/lib/lxd/unix.socket (Stream)
    Tasks: 0 (limit: 2319)
   CGroup: /system.slice/lxd.socket

● lxd.service - LXD - main daemon
   Loaded: loaded (/lib/systemd/system/lxd.service; indirect; vendor preset: enabled)
   Active: active (running) since Wed 2019-11-13 16:31:11 IST; 34s ago
     Docs: man:lxd(1)
  Process: 1825 ExecStartPost=/usr/bin/lxd waitready --timeout=600 (code=exited, status=0/SUCCESS)
  Process: 1773 ExecStartPre=/usr/lib/x86_64-linux-gnu/lxc/lxc-apparmor-load (code=exited, status=0/SUCCESS)
 Main PID: 1824 (lxd)
    Tasks: 12
   CGroup: /system.slice/lxd.service
           ├─1824 /usr/lib/lxd/lxd --group lxd --logfile=/var/log/lxd/lxd.log
           └─2651 dnsmasq --strict-order --bind-interfaces --pid-file=/var/lib/lxd/networks/lxdbr0/dnsmasq.pid --except-interface=lo --interface=lxdbr0 --quiet-dhcp --quiet-dhcp6 --quiet-ra --listen-address=10.151.238.1 --dhcp-no-overrid

The problem has been sorted out. I had an enabled systemd service with

[Unit]
After=lxd-containers.service
Wants=lxd-containers.service

I disabled this service and lxd doesn’t start automatically any more.