2

There is a ganeti cluster. Is there any way to run script on ganeti node after some instance is start running on that node? In both situations - starting from scratch, and migrating live from another host.

It's possible to do it "automated" way(excluding modifying sources)? Only idea which i have is to invoke a trigger from instance to node to run script - but i know that it's not good way.

Are there any scripts running for instances in node context?

undefine
  • 956
  • 8
  • 20

1 Answers1

1

Yes. You want to use hooks for this, as outlined in the docs:

In order to allow customisation of operations, Ganeti runs scripts in sub-directories of @SYSCONFDIR@/ganeti/hooks. These sub-directories are named $hook-$phase.d, where $phase is either pre or post and $hook matches the directory name given for a hook (e.g. cluster-verify-post.d or node-add-pre.d).

This is similar to the /etc/network/ structure present in Debian for network interface handling.

(If you're running into specific problems or need additional help, please let me know, I'm glad to help.)

gxx
  • 5,483
  • 2
  • 21
  • 42