Page MenuHomeClusterLabs Projects

Location constraints don't affect promotion score
Closed (Won't Fix)Public

Description

First testing with role="Promoted" location constraint:

# # No constraints initially

# crm_simulate -Ls
[ fastvm-rhel-9-0-42 fastvm-rhel-9-0-43 ]

Promoted: [ fastvm-rhel-9-0-42 ]
Unpromoted: [ fastvm-rhel-9-0-43 ]

pcmk__clone_assign: stateful-clone allocation score on fastvm-rhel-9-0-42: 0
pcmk__clone_assign: stateful-clone allocation score on fastvm-rhel-9-0-43: 0
pcmk__clone_assign: stateful:0 allocation score on fastvm-rhel-9-0-42: 11
pcmk__clone_assign: stateful:0 allocation score on fastvm-rhel-9-0-43: 0
pcmk__clone_assign: stateful:1 allocation score on fastvm-rhel-9-0-42: 0
pcmk__clone_assign: stateful:1 allocation score on fastvm-rhel-9-0-43: 6
pcmk__primitive_assign: stateful:0 allocation score on fastvm-rhel-9-0-42: 11
pcmk__primitive_assign: stateful:0 allocation score on fastvm-rhel-9-0-43: 0
pcmk__primitive_assign: stateful:1 allocation score on fastvm-rhel-9-0-42: -INFINITY
pcmk__primitive_assign: stateful:1 allocation score on fastvm-rhel-9-0-43: 6
stateful:0 promotion score on fastvm-rhel-9-0-42: INFINITY
stateful:1 promotion score on fastvm-rhel-9-0-43: -INFINITY

# crm_resource --resource stateful-clone --move --promoted --node fastvm-rhel-9-0-43

# # Scores don't change

# crm_simulate -Ls
[ fastvm-rhel-9-0-42 fastvm-rhel-9-0-43 ]

Promoted: [ fastvm-rhel-9-0-42 ]
Unpromoted: [ fastvm-rhel-9-0-43 ]

pcmk__clone_assign: stateful-clone allocation score on fastvm-rhel-9-0-42: 0
pcmk__clone_assign: stateful-clone allocation score on fastvm-rhel-9-0-43: 0
pcmk__clone_assign: stateful:0 allocation score on fastvm-rhel-9-0-42: 11
pcmk__clone_assign: stateful:0 allocation score on fastvm-rhel-9-0-43: 0
pcmk__clone_assign: stateful:1 allocation score on fastvm-rhel-9-0-42: 0
pcmk__clone_assign: stateful:1 allocation score on fastvm-rhel-9-0-43: 6
pcmk__primitive_assign: stateful:0 allocation score on fastvm-rhel-9-0-42: 11
pcmk__primitive_assign: stateful:0 allocation score on fastvm-rhel-9-0-43: 0
pcmk__primitive_assign: stateful:1 allocation score on fastvm-rhel-9-0-42: -INFINITY
pcmk__primitive_assign: stateful:1 allocation score on fastvm-rhel-9-0-43: 6
stateful:0 promotion score on fastvm-rhel-9-0-42: INFINITY
stateful:1 promotion score on fastvm-rhel-9-0-43: -INFINITY

[root@fastvm-rhel-9-0-42 pacemaker]# pcs constraint
Location Constraints:
  Resource: stateful-clone
    Enabled on:
      Node: fastvm-rhel-9-0-43 (score:INFINITY) (role:Promoted)

# # constraints section of CIB
    <constraints>
      <rsc_location id="cli-prefer-stateful-clone" rsc="stateful-clone" role="Promoted" node="fastvm-rhel-9-0-43" score="INFINITY"/>
    </constraints>

Now testing with role="Started" location constraint, still no meaningful effect:

    <constraints>
      <rsc_location id="cli-prefer-stateful-clone" rsc="stateful-clone" role="Started" node="fastvm-rhel-9-0-43" score="INFINITY"/>
    </constraints>

# crm_simulate -LSs
[ fastvm-rhel-9-0-42 fastvm-rhel-9-0-43 ]

Promoted: [ fastvm-rhel-9-0-42 ]
Unpromoted: [ fastvm-rhel-9-0-43 ]

pcmk__clone_assign: stateful-clone allocation score on fastvm-rhel-9-0-42: 0
pcmk__clone_assign: stateful-clone allocation score on fastvm-rhel-9-0-43: INFINITY
pcmk__clone_assign: stateful:0 allocation score on fastvm-rhel-9-0-42: 11
pcmk__clone_assign: stateful:0 allocation score on fastvm-rhel-9-0-43: INFINITY
pcmk__clone_assign: stateful:1 allocation score on fastvm-rhel-9-0-42: 0
pcmk__clone_assign: stateful:1 allocation score on fastvm-rhel-9-0-43: INFINITY
pcmk__primitive_assign: stateful:0 allocation score on fastvm-rhel-9-0-42: 11
pcmk__primitive_assign: stateful:0 allocation score on fastvm-rhel-9-0-43: INFINITY
pcmk__primitive_assign: stateful:1 allocation score on fastvm-rhel-9-0-42: -INFINITY
pcmk__primitive_assign: stateful:1 allocation score on fastvm-rhel-9-0-43: INFINITY
stateful:0 promotion score on fastvm-rhel-9-0-42: INFINITY
stateful:1 promotion score on fastvm-rhel-9-0-43: -INFINITY



[ fastvm-rhel-9-0-42 fastvm-rhel-9-0-43 ]

Promoted: [ fastvm-rhel-9-0-42 ]
Unpromoted: [ fastvm-rhel-9-0-43 ]

Event Timeline

nrwahl2 triaged this task as Normal priority.Nov 22 2023, 4:22 AM
nrwahl2 created this task.
nrwahl2 created this object with edit policy "Restricted Project (Project)".
nrwahl2 claimed this task.

False alarm, stonith-enabled wasn't set to false and there were no stonith devices. Interesting that the resource was started and promoted in the first place though.