On Tue, Nov 09, 2010 at 06:06:30PM +0900, Keisuke MORI wrote:
> Lars,
>
> 2010/10/27 Lars Ellenberg <[email protected]>:
> > On Mon, Oct 25, 2010 at 08:21:26PM +0900, Keisuke MORI wrote:
> >> Hi,
> >>
> >> The recent heartbeat on the tip would cause an assertion fail in
> >> pacemaker-1.0 and generate a core:
> (snip)
> > I don't care for the "get_more_random()" stuff and
> > keeping 100 "random" values prepared for get_next_random,
> > that is probably just academic sugar, anyways.
> >
> > If it does not work, we throw it all out, or fix it.
>
> Ok, then let's just drop the changeset.
>
> I agree that srand should not be called many times,
> but I would rather prefer to just keep the existing behavior
> since there have been no problems with that so far.
Ok, I'll revert it for now.
But I'd rather have it working there.
Would this patch to the cib do the right thing?
diff --git a/cib/main.c b/cib/main.c
--- a/cib/main.c
+++ b/cib/main.c
@@ -410,6 +410,10 @@ cib_init(void)
exit(1);
}
+ /* Create the mainloop early, so test on g_main_loop_is_running(NULL)
+ * won't trigger an assert. */
+ mainloop = g_main_new(FALSE);
+
if(stand_alone == FALSE) {
void *dispatch = cib_ha_peer_callback;
void *destroy = cib_ha_connection_destroy;
@@ -489,29 +493,18 @@ cib_init(void)
return 1;
}
cib_is_master = TRUE;
-
- /* Create the mainloop and run it... */
- mainloop = g_main_new(FALSE);
- crm_info("Starting %s mainloop", crm_system_name);
-
- g_main_run(mainloop);
- return 0;
+ } else {
+ if (was_error) {
+ crm_err("Couldnt start all communication channels,
exiting.");
+ return 1;
+ }
+ g_timeout_add(
+ crm_get_msec(cib_stat_interval), cib_stats, NULL);
}
- if(was_error == FALSE) {
- /* Create the mainloop and run it... */
- mainloop = g_main_new(FALSE);
- crm_info("Starting %s mainloop", crm_system_name);
-
- g_timeout_add(
- crm_get_msec(cib_stat_interval), cib_stats, NULL);
-
- g_main_run(mainloop);
-
- } else {
- crm_err("Couldnt start all communication channels, exiting.");
- }
-
+ /* Run the mainloop */
+ crm_info("Starting %s mainloop", crm_system_name);
+ g_main_run(mainloop);
return 0;
}
> Any other backlogs to release the heartbeat packeage?
> I would look forward to be released it soon!
Me too. Alas ...
We try to get it out until next Friday (19th November)
Cheers,
--
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/