[Pacemaker] Problem with pingd.

Andrew Beekhof andrew at beekhof.net
Tue Feb 23 08:02:08 UTC 2010


On Tue, Feb 23, 2010 at 8:51 AM, Jayakrishnan <jayakrishnanlll at gmail.com> wrote:
> Sir,
> Could you explain that a bit more. I have been reading the same document for
> 2 days and cant specify the type as integer. It is showing as
>
> "Parsing error, do you want tot edit it again"

[08:18 AM] root at f12 ~ # crm configure help location
Signon to CIB failed: connection failed
Init failed, could not perform requested operations
ERROR: cannot parse xml: no element found: line 1, column 0

`location` defines the preference of nodes for the given
resource. The location constraints consist of one or more rules
which specify a score to be awarded if the rule matches.

Usage:
...............
        location <id> <rsc> {node_pref|rules}

        node_pref :: <score>: <node>

        rules ::
          rule [id_spec] [$role=<role>] <score>: <expression>
          [rule [id_spec] [$role=<role>] <score>: <expression> ...]

        id_spec :: $id=<id> | $id-ref=<id>
        score :: <number> | <attribute> | [-]inf
        expression :: <simple_exp> [bool_op <simple_exp> ...]
        bool_op :: or | and
        simple_exp :: <attribute> [type:]<binary_op> <value>
                      | <unary_op> <attribute>
                      | date <date_expr>
        type :: string | version | number
        binary_op :: lt | gt | lte | gte | eq | ne
        unary_op :: defined | not_defined

        date_expr :: lt <end>
                     | gt <start>
                     | in_range start=<start> end=<end>
                     | in_range start=<start> <duration>
                     | date_spec <date_spec>
        duration|date_spec ::
                     hours=<value>
                     | monthdays=<value>
                     | weekdays=<value>
                     | yearsdays=<value>
                     | months=<value>
                     | weeks=<value>
                     | years=<value>
                     | weekyears=<value>
                     | moon=<value>
...............
Examples:
...............
        location conn_1 internal_www 100: node1

        location conn_1 internal_www \
          rule 50: #uname eq node1 \
          rule pingd: defined pingd

        location conn_2 dummy_float \
          rule -inf: not_defined pingd or pingd lte 0
...............


Though this last example is wrong:

        location conn_2 dummy_float \
          rule -inf: not_defined pingd or pingd number:lte 0




More information about the Pacemaker mailing list