[ClusterLabs] Knowing where a resource is running
Ken Gaillot
kgaillot at redhat.com
Mon Jun 4 13:11:51 EDT 2018
On Wed, 2018-05-16 at 14:37 -0500, Ryan Thomas wrote:
> I’m attempting to implement a resource that is “master” on only one
> node, but the other slave nodes know where the resource is running so
> they can forward requests to the “master” node. It seems like this
> can be accomplished by creating a multi-state resource with
> configured with 1 master with the ‘notify’ action enabled, and then
> have the slave’s listen to the pre-promote or post-promote
> notifications. However, if node A is the master, and node B is
> rebooted… when node B starts back up, I don’t think it will see a
> pre/post-promote notification because the promote has already
> occurred. Is there a way for the resource on node B to be informed
> that node A is already the master in this case? I know that I could
> run ‘pcs resource’ or ‘pcs status’ or etc to see the local status of
> the resources and parse the output, but I’d prefer a cleaner and less
> fragile solution. Any suggestions?
> Thanks!
You're right node B won't get notifications in that case, but you can
check the value of OCF_RESKEY_CRM_meta_notify_master_uname in a start
action when notify is true.
--
Ken Gaillot <kgaillot at redhat.com>
More information about the Users
mailing list