Start / stop hooks?

Does LXD have provide hooks for event driven scripts?

The ones I’m particularly interested in are:

  • post “start” network to allow sysctl etc settings for the software defined network devices to be set
  • post init instance to enable instance related background jobs (e.g. monitoring) to be started

I can probably fake something up around LXD, but that’s a pain as it would be much cleaner done using hooks.

Thanks
David

Not currently. We don’t want to add traditional hook scripts or hook directories as that leads to issues that are very hard to debug not to mention different systems within a cluster may then start behaving differently.

Instead, we’ve been thinking more towards adding some kind of webhook mechanism where you register a service with LXD which will get notified of some classes of events either in a blocking or non-blocking way. We have an open issue for implementing something like this, but it hasn’t been a priority so far.