[ClusterLabs] Best way to create a floating identity file

Tony Stocker akostocker at gmail.com
Tue Dec 15 08:58:15 EST 2020


I'm trying to figure out the best way to do the following on our
2-node clusters.

Whichever node is the primary (all services run on a single node) I
want to create a file that contains an identity descriptor, e.g.
/var/local/project/identity and the contents are "httpserver". This is
so that we can utilize this file in cron scripts (and other programs)
to determine on which system log files should get rotated, services
should get HUP'd, etc. When the resource group moves between nodes,
this file gets deleted on the (now) inactive node and written to on
the active node.

Is there already a resource agent that does this? If so, could someone
point me at it?

If not, what's the best way to accomplish this? Is it necessary to
write a complete resource agent script just to do this? Or is there a
simpler way?

Thanks for your help


More information about the Users mailing list