High: PE: Disable resource management if stonith-enabled=true and no stonith resources are defined stable-1.0

12 months ago

author
Andrew Beekhof <andrew@beekhof.net>
date
Wed Aug 19 16:57:50 2009 +0200
branch
stable-1.0
changeset 14903
849aa0d0696d
parent 14902
455c6e9efc49
child 14904
9417c8f64397

High: PE: Disable resource management if stonith-enabled=true and no stonith resources are defined
Since the cluster will not be able to make progress anyway, this makes the
cluster quieter and should make the true problem more apparent to end users

lib/pengine/unpack.c file | annotate | diff | revisions
pengine/native.c file | annotate | diff | revisions
     1.1 --- a/lib/pengine/unpack.c	Wed Aug 19 14:26:04 2009 +0200
     1.2 +++ b/lib/pengine/unpack.c	Wed Aug 19 16:57:50 2009 +0200
     1.3 @@ -295,7 +295,7 @@
     1.4  		data_set->resources, sort_rsc_priority);
     1.5  
     1.6  	if(is_set(data_set->flags, pe_flag_stonith_enabled) && is_set(data_set->flags, pe_flag_have_stonith_resource) == FALSE) {
     1.7 -	    crm_config_err("No STONITH resources have been defined");
     1.8 +	    crm_config_err("Resource start-up disabled since no STONITH resources have been defined");
     1.9  	    crm_config_err("Either configure some or disable STONITH with the stonith-enabled option");
    1.10  	    crm_config_err("NOTE: Clusters with shared data need STONITH to ensure data integrity");
    1.11  	}
     2.1 --- a/pengine/native.c	Wed Aug 19 14:26:04 2009 +0200
     2.2 +++ b/pengine/native.c	Wed Aug 19 16:57:50 2009 +0200
     2.3 @@ -303,6 +303,11 @@
     2.4  	}
     2.5  
     2.6  	dump_node_scores(show_scores?0:scores_log_level, rsc, __PRETTY_FUNCTION__, rsc->allowed_nodes);
     2.7 +	if(is_set(data_set->flags, pe_flag_stonith_enabled)
     2.8 +	       && is_set(data_set->flags, pe_flag_have_stonith_resource) == FALSE) {
     2.9 +	    clear_bit(rsc->flags, pe_rsc_managed);
    2.10 +	}
    2.11 +
    2.12  	if(is_not_set(rsc->flags, pe_rsc_managed)) {
    2.13  	    const char *reason = NULL;
    2.14  	    node_t *assign_to = NULL;

mercurial