[Pacemaker] Re: [PATCH] election trigger

Andrew Beekhof beekhof at gmail.com
Sun Nov 2 14:32:14 EST 2008


On Oct 30, 2008, at 6:08 PM, Bernd Schubert wrote:

> Heartbeat calls crmd only if all nodes are already online.

Not everyone uses it on heartbeat anymore ;-)

> So introducing
> another posssibly huge deadtime here will at least delay the DC  
> selection
> and so resource startup by heartbeats initial deadtime. If one node  
> e.g.
> after a global power failure doesn't come up at all, the DC  
> selection was
> even delayed by 2 x initial hb deadtime. Simply remove the usage of
> heartbeats initial deadtime and only use our own.

I don't understand.
The logic below is only triggered for people who haven't set a value  
for dc_deadtime... why not just set a value in the cib?


> Signed-off-by: Bernd Schubert <bs at q-leap.de>
>
> diff --git a/crmd/control.c b/crmd/control.c
> --- a/crmd/control.c
> +++ b/crmd/control.c
> @@ -747,23 +747,6 @@ config_query_callback(xmlNode *msg, int
> 		output, XML_CIB_TAG_PROPSET, NULL, config_hash,
> 		CIB_OPTIONS_FIRST, FALSE, now);
> 	
> -	value = g_hash_table_lookup(config_hash,  
> XML_CONFIG_ATTR_DC_DEADTIME);
> -	if(value == NULL) {
> -		/* apparently we're not allowed to free the result of getenv */
> -		char *param_val = getenv(ENV_PREFIX "initdead");
> -
> -		value = crmd_pref(config_hash, XML_CONFIG_ATTR_DC_DEADTIME);
> -		if(param_val != NULL) {
> -			int from_env = crm_get_msec(param_val) / 2;
> -			int from_defaults = crm_get_msec(value);
> -			if(from_env > from_defaults) {
> -				g_hash_table_replace(
> -					config_hash, crm_strdup(XML_CONFIG_ATTR_DC_DEADTIME),
> -					crm_strdup(param_val));
> -			}
> -		}
> -	}
> -
> 	verify_crmd_options(config_hash);
>
> 	value = crmd_pref(config_hash, XML_CONFIG_ATTR_DC_DEADTIME);
>
>
> -- 
> Bernd Schubert
> Q-Leap Networks GmbH
>
> _______________________________________________
> Pacemaker mailing list
> Pacemaker at clusterlabs.org
> http://list.clusterlabs.org/mailman/listinfo/pacemaker





More information about the Pacemaker mailing list