[Pacemaker] [Patch] The log when I lost Quorum is never output.
Andrew Beekhof
andrew at beekhof.net
Thu Oct 18 00:03:50 UTC 2012
Good catch!
On Thu, Oct 18, 2012 at 10:33 AM, <renayama19661014 at ybb.ne.jp> wrote:
> Hi Andrew,
>
> Thank you for comments.
>
> Even your correction is good, but one place of correction is necessary.
>
> #if SUPPORT_HEARTBEAT
> -static gboolean fsa_have_quorum = FALSE;
>
> gboolean ccm_dispatch(int fd, gpointer user_data)
> {
> @@ -575,14 +574,14 @@
>
> if(update_quorum) {
> crm_have_quorum = ccm_have_quorum(event);
> - crm_update_quorum(crm_have_quorum, FALSE);
>
> if(crm_have_quorum == FALSE) {
> /* did we just loose quorum? */
> - if(fsa_have_quorum) {
> + if(fsa_has_quorum) {
> crm_info("Quorum lost: %s", ccm_event_name(event));
> }
> }
> + crm_update_quorum(crm_have_quorum, FALSE);
> }
>
> if(update_cache) {
>
>
> And I think fsa_have_quorum to delete it because I am not necessary.
>
>
> Best Regards,
> Hideo Yamauuchi.
>
>
> --- On Thu, 2012/10/18, Andrew Beekhof <andrew at beekhof.net> wrote:
>
>> What about this instead?
>>
>> diff --git a/crmd/heartbeat.c b/crmd/heartbeat.c
>> index cae143b..3a7f31d 100644
>> --- a/crmd/heartbeat.c
>> +++ b/crmd/heartbeat.c
>> @@ -354,14 +354,13 @@ crmd_ccm_msg_callback(oc_ed_t event, void
>> *cookie, size_t size, const void *data
>>
>> if (update_quorum) {
>> crm_have_quorum = ccm_have_quorum(event);
>> - crm_update_quorum(crm_have_quorum, FALSE);
>> -
>> if (crm_have_quorum == FALSE) {
>> /* did we just loose quorum? */
>> if (fsa_have_quorum) {
>> crm_info("Quorum lost: %s", ccm_event_name(event));
>> }
>> }
>> + crm_update_quorum(crm_have_quorum, FALSE);
>> }
>>
>> if (update_cache) {
>>
>>
>> On Wed, Oct 17, 2012 at 6:41 PM, <renayama19661014 at ybb.ne.jp> wrote:
>> > Hi All,
>> >
>> > I watched a source of crmd of ClusterLabs-pacemaker-1.0-Pacemaker-1.0.12-116-gf372204.zip.
>> >
>> > I found the log("Quorum lost: ....") processing that was never output.
>> > The cause that log is not output is fsa_have_quorum.
>> > This value is always FALSE.
>> >
>> > (snip)
>> > * crmd/callback.c
>> > #if SUPPORT_HEARTBEAT
>> > static gboolean fsa_have_quorum = FALSE;
>> > (snip)
>> > if(update_quorum) {
>> > crm_have_quorum = ccm_have_quorum(event);
>> > crm_update_quorum(crm_have_quorum, FALSE);
>> >
>> > if(crm_have_quorum == FALSE) {
>> > /* did we just loose quorum? */
>> > if(fsa_have_quorum) {
>> > crm_info("Quorum lost: %s", ccm_event_name(event));
>> > }
>> > }
>> > }
>> > (snip)
>> >
>> > I made a patch to output this log.
>> > Please apply to a repository if this patch does not have a problem.
>> >
>> > Best Regards,
>> > Hideo Yamauchi.
>> > _______________________________________________
>> > Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
>> > http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>> >
>> > Project Home: http://www.clusterlabs.org
>> > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
>> > Bugs: http://bugs.clusterlabs.org
>> >
>>
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
>
More information about the Pacemaker
mailing list