Alan Conway wrote:
> Chrissie Caulfield wrote:
>> Alan Conway wrote:
>>> I've got a cluster app that works fine with corosync alone. Hoever if
>>> I start corosync via cman I get errno 11 - "access denied" from
>>> cpg_init. Is there some different security rule when cman is in play?
>>
>> cman enables quorum, and many IPC calls are blocked when the cluster is
>> inquorate - including CPG. So it could be simply that you need to make
>> sure your cluster has quorum.
>>
> 
> Ok good to know - so I can't start any CPG app until the cluster is
> quorate?
> 
> I was under the impression that my app needed to call cman_is_quorate
> itself and delay startup till it gets a true value. Also that it should
> check cman_is_quorate while running and shut down if it ever loses
> quorum. Are you saying that both of these things will happen
> automatically and I can delete all that code?

Shutting down if an app loses quorum is probably a little drastic ;-)
But cpg will block calls if the cluster is not quorate, so you can
remove any calls that prevent messages being sent around an inquiorate
cluster, yes.

> For start-up, how can I get my app started after cman gets a quorum?  I
> guess I can't just use regular /etc/init.d scripts since I have no way
> of knowing when quorum is achieved - is there some way to schedule apps
> to be started by cman once quorate?

cmannotifyd is probably what you want here. It can run arbitrary scripts
when the cman state changes - nodes up and down. It sets the environment
variable  CMAN_NOTIFICATION_QUORUM so you can start applications if
necessary.

Of course, you can do it the 'old' way by waiting in a cman_dispatch
loop for quorum to be achieved before attempting a cpg connection.

Chrissie
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to