[Linux-ha-dev] Dynamic Modify the timeout values
DAIKI MATSUDA
d.matuda at gmail.com
Wed Jun 27 00:40:27 MDT 2007
Hello, All.
Some days ago I sent the patch that offer the function to apply the
timeout values without suspending the heartbeat service. Then
Horms-san suggested me to modify it. So, I re-make and attach. The
Attached patches should be applied from 1_... to 5_...
Additionally some other bugs are fixed, including:
1. When clients did signoff the communication channel, its pointer was
removed. But maxdispatchdelay_array remembered it and
modify_setmaxdispatchdelay_value() accessed it.
2. As g_ptr_array_free() removed the pointers included its elements,
the communication channel vanished. So when heartbeat was shutdown, it
could not kill some clients.
And I note the additional information as following,
1. I am testing on the dev source tree now simply and works well.
Attached the patches can be applied to the 5bb25d3ce208 source tree.
2. Though I am suggested to use modify_keepalive_value() in both
startup and modify cases, I do not do so.
I cleaned it up. But there are no functional changes from the previous
version of the patch. (except init scripts and bug fixes?) So if you
send the signal (SIGRTMAX) to a server, the values are effective for
the server and do not transmit to the other servers. But by adding the
function to communicate to other servers, such as HBDoMsg_T_STATUS(),
I think that it is possible to do.
Followings are the description for the patch files.
1_record_timeout_to_array.patch:
This patch is for the 3 tables, maxdispatchdelay_array, setall_array
and timeout_add_full_array. They are for remembering the behaviour of
the functions, G_main_set_maxdispatchdelay(), G_main_setall_id() and
Gmain_timeout_add_full(), because they use the values generated by the
timeout values or equal to the timeouts values. I choose the Glib
functions for them as same as the original codes.
2_add_signal_handler.patch:
This patch adds the function to handle the signal SIGRTMAX. I think
that it is good to use the signal for applying the values, because
current reload function use the SIGHUP signal. There was no
modification for init script files in the previous patch, but this
time patch includes the option 'light-reload' and 'lread'.
3_add_parse_fucntion.patch:
This patch is written for the behaviour after receiving the signal,
especially parsing the ha.cf configuration file. As previous pointed,
the light_parse_config() function is adjusted to the parse_config().
4_apply_modified_value.patch:
This patch is written for after receiving the signal, too. Especially,
for applying the variables the values actually.
5_send_keepalive_to_ccm.patch:
This patch is for sending the keepalive value for ccm. To do so it
uses the existing communication channel. Maybe this is not enough
clean.
I want to listen to your advice for the function, the patch and etc.
Best Regards
MATSUDA, Daiki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1_remember_timeout_to_array.patch
Type: text/x-patch
Size: 9263 bytes
Desc: not available
Url : http://lists.community.tummy.com/pipermail/linux-ha-dev/attachments/20070627/aff43b52/1_remember_timeout_to_array-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2_add_signal_handler.patch
Type: text/x-patch
Size: 3306 bytes
Desc: not available
Url : http://lists.community.tummy.com/pipermail/linux-ha-dev/attachments/20070627/aff43b52/2_add_signal_handler-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3_add_parse_fucntion.patch
Type: text/x-patch
Size: 9866 bytes
Desc: not available
Url : http://lists.community.tummy.com/pipermail/linux-ha-dev/attachments/20070627/aff43b52/3_add_parse_fucntion-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 4_apply_modified_value.patch
Type: text/x-patch
Size: 8903 bytes
Desc: not available
Url : http://lists.community.tummy.com/pipermail/linux-ha-dev/attachments/20070627/aff43b52/4_apply_modified_value-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 5_send_keepalive_to_ccm.patch
Type: text/x-patch
Size: 4228 bytes
Desc: not available
Url : http://lists.community.tummy.com/pipermail/linux-ha-dev/attachments/20070627/aff43b52/5_send_keepalive_to_ccm-0001.bin
More information about the Linux-HA-Dev
mailing list