[Pacemaker] Can't failover Master/Slave with group(primitive x3) setting

Andrew Beekhof andrew at beekhof.net
Thu Oct 6 23:58:33 EDT 2011


On Fri, Oct 7, 2011 at 2:50 PM, Andrew Beekhof <andrew at beekhof.net> wrote:
> On Fri, Oct 7, 2011 at 2:21 PM, Andrew Beekhof <andrew at beekhof.net> wrote:
>> On Fri, Oct 7, 2011 at 11:39 AM, Andrew Beekhof <andrew at beekhof.net> wrote:
>>> On Fri, Sep 30, 2011 at 3:44 PM, Junko IKEDA <tsukishima.ha at gmail.com> wrote:
>>>> Hi,
>>>>
>>>> sorry for the confusion.
>>>>
>>>> Pacemaker 1.0.10 OK(group resource can failover)
>>>> Pacemaker 1.0.11 NG(gruop resource just stop, can not failover)
>>>> Pacemaker 1.1 <- the latest hg (gruop resource just stop, can not failover)
>>>
>>> We've actually moved over 1.1 to git:
>>>   http://www.clusterlabs.org/wiki/Contributing_Patches
>>>
>>> I should mark that somehow in the HG tree.
>>>
>>>>
>>>> By the way, your simulation showed dummy01 restart on bl460g1n13 again,
>>>> but dummy01 failed on bl460g1n13, so dummy01 should move to bl460g1n14.
>>>
>>> Hmmm. True.  I'll take another look.
>>
>> Getting this and coloc-clone-stays-active to behave at the same time
>> is proving a challenge :-(
>>
>
> I'm not 100% sure I like this patch but could you see how it behaves
> in your testing?

Or if it helps:
   https://github.com/beekhof/pacemaker/commit/3312b9e

(The beekhof repo is my private playground for things that may not yet
be ready for the ClusterLabs tree)

>
>
> diff --git a/pengine/native.c b/pengine/native.c
> index 52f6f0f..8718abb 100644
> --- a/pengine/native.c
> +++ b/pengine/native.c
> @@ -26,6 +26,7 @@
>  #include <utils.h>
>
>  #define DELETE_THEN_REFRESH 1   /* The crmd will remove the resource
> from the CIB itself, making this redundant */
> +#define INFINITY_HACK   (INFINITY * -100)
>
>  #define VARIANT_NATIVE 1
>  #include <lib/pengine/variant.h>
> @@ -287,8 +288,12 @@ node_hash_update(GHashTable * list1, GHashTable *
> list2, const char *attr, int f
>             crm_trace("%s: Filtering %d + %d*%d (factor * score)",
>                       node->details->uname, node->weight, factor, score);
>
> +        } else if (node->weight == INFINITY_HACK) {
> +            crm_trace("%s: Filtering %d + %d*%d (node < 0)",
> +                      node->details->uname, node->weight, factor, score);
> +
>         } else if (only_positive && new_score < 0 && node->weight > 0) {
> -            node->weight = 1;
> +            node->weight = INFINITY_HACK;
>             crm_trace("%s: Filtering %d + %d*%d (score > 0)",
>                       node->details->uname, node->weight, factor, score);
>
> @@ -300,7 +305,6 @@ node_hash_update(GHashTable * list1, GHashTable *
> list2, const char *attr, int f
>             crm_trace("%s: %d + %d*%d", node->details->uname,
> node->weight, factor, score);
>             node->weight = new_score;
>         }
> -
>     }
>  }
>
> @@ -405,6 +409,17 @@ rsc_merge_weights(resource_t * rsc, const char
> *rhs, GHashTable * nodes, const c
>
>     }
>
> +    if(is_set(flags, pe_weights_positive)) {
> +        node_t *node = NULL;
> +        GHashTableIter iter;
> +        g_hash_table_iter_init(&iter, work);
> +        while (g_hash_table_iter_next(&iter, NULL, (void **)&node)) {
> +            if (node->weight == INFINITY_HACK) {
> +                node->weight = 1;
> +            }
> +        }
> +    }
> +
>     if (nodes) {
>         g_hash_table_destroy(nodes);
>     }
>




More information about the Pacemaker mailing list