At what point lxd started instances?

thanks, following your other post:

I come out with a service to be run before the lxd.daemon:

[Unit]
Description=Setup foo
Before=snap.lxd.daemon.service

[Service]
Type=oneshot
ExecStart=/opt/foo/setup-foo.sh
RemainAfterExit=true
ExecStop=/opt/foo/teardown-foo.sh
StandardOutput=journal

[Install]
WantedBy=multi-user.target

if setup-foo.sh succeeded , snap.lxd.daemon.service got started, good, but if setup-foo.sh failed , snap.lxd.daemon.service got started as well, is this how ‘Before’ directive works? thanks

Apr 28 13:27:37 backup systemd[1]: foo.service: Main process exited, code=exited, status=1/FAILURE
Apr 28 13:27:37 backup systemd[1]: foo.service: Failed with result 'exit-code'.
Apr 28 13:27:37 backup systemd[1]: Failed to start Setup foo.