On 07/29/11 08:29, [email protected] wrote:
>>>
>>> I think that the following correction is necessary.
>>> snmp_subagent/hbagent.c
>>> (snip)
>>> } else {
>>>
>>> /* snmp request */
>>> snmp_read(&fdset);
>>>
>>> ret = handle_heartbeat_msg(); ----> read
>>> queueing msg.!!
>>
>> I suggest to place this before the select instead.
>> Or immediately after each call that involves the read_api_msg or
>> enqueue_msg.
>>
>> Probably easier to just place it before the select, or any other call
>> that may sleep or block for some time.
>
> Thank you for the suggestion of the correction.
> I want to wait for the opinion of Mr. Yan.
>
>> As hbagent.c was dropped from the heartbeat source tree three years ago,
>> you will have to carry that patch yourself, I'm affraid.
>>
>> Unless someone resurrects the hbagent for current heartbeat,
>> if still applicable, and possibly improves/integrates it
>> with the pacemaker side of things.
>
> We do not think about the correction of Heartbeat, too for the moment.
> We think that only the correction of Pacemaker-mgmt is enough.
That attached patch places it at the end of the loop. I think it should
work. Please give it a test.
Regards,
Yan
--
Gao,Yan <[email protected]>
Software Engineer
China Server Team, SUSE.
--
Gao,Yan <[email protected]>
Software Engineer
China Server Team, SUSE.
diff -r 1a1d9055abec snmp_subagent/hbagent.c
--- a/snmp_subagent/hbagent.c Wed Jun 01 16:32:23 2011 +0800
+++ b/snmp_subagent/hbagent.c Fri Jul 29 12:09:39 2011 +0800
@@ -1669,6 +1669,15 @@ process_pending:
run_alarms();
netsnmp_check_outstanding_agent_requests();
+#if SUPPORT_HEARTBEAT
+ if (is_heartbeat_cluster()) {
+ if ((ret = handle_heartbeat_msg()) == HA_FAIL) {
+ cl_log(LOG_DEBUG, "no heartbeat. quit now.");
+ hb_already_dead = 1;
+ break;
+ }
+ }
+#endif
}
/* at shutdown time */
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems