sthonith constraint location should not have INFINITY as score

Bug #1829146 reported by Michele Baldessari
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet-pacemaker
Fix Released
Undecided
Michele Baldessari

Bug Description

Right now when we create a stonith resource we add the location
constraint as follows:
pcs constraint location stonith-fence_ipmilan-525400bb6781 avoids controller-0

This, by default, will create a location constraint with INFINITY score,
meaning that this stonith manifest will never ever be allowed to run on
controller-0 no matter what:

  Resource: stonith-fence_ipmilan-525400bb6781
    Disabled on: controller-0 (score:-INFINITY) (id:location-stonith-fence_ipmilan-525400bb6781-controller-0--INFINITY)

This is not ideal because we still want to be able to run this stonith
resource on controller-0 if all else fails.
Let's tweak this stonith resource creation to use a very high score
(10000) so that, ultimately the stonith resource is allowed to run
on the same controlled node itself.

Changed in puppet-pacemaker:
assignee: nobody → Michele Baldessari (michele)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-pacemaker (master)

Fix proposed to branch: master
Review: https://review.opendev.org/659252

Changed in puppet-pacemaker:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-pacemaker (master)

Reviewed: https://review.opendev.org/659252
Committed: https://git.openstack.org/cgit/openstack/puppet-pacemaker/commit/?id=57f65b89191e39cb9add8187fcbff118830d570e
Submitter: Zuul
Branch: master

commit 57f65b89191e39cb9add8187fcbff118830d570e
Author: Michele Baldessari <email address hidden>
Date: Wed May 15 10:05:49 2019 +0200

    Do not avoid same node with INFINITY score

    Right now when we create a stonith resource we add the location
    constraint as follows:
    pcs constraint location stonith-fence_ipmilan-525400bb6781 avoids controller-0

    This, by default, will create a location constraint with INFINITY score,
    meaning that this stonith manifest will never ever be allowed to run on
    controller-0 no matter what:

      Resource: stonith-fence_ipmilan-525400bb6781
        Disabled on: controller-0 (score:-INFINITY) (id:location-stonith-fence_ipmilan-525400bb6781-controller-0--INFINITY)

    This is not ideal because we still want to be able to run this stonith
    resource on controller-0 if all else fails.
    Let's tweak this stonith resource creation to use a very high score
    (10000) so that, ultimately the stonith resource is allowed to run
    on the same controlled node itself.

    Tested and correctly got all location constraints set:
      Resource: stonith-fence_ipmilan-525400116021
        Disabled on: compute-0 (score:-10000) (id:location-stonith-fence_ipmilan-525400116021-compute-0--10000)
      Resource: stonith-fence_ipmilan-5254002a5c13
        Disabled on: controller-0 (score:-10000) (id:location-stonith-fence_ipmilan-5254002a5c13-controller-0--10000)
      Resource: stonith-fence_ipmilan-5254004d7139
        Disabled on: compute-1 (score:-10000) (id:location-stonith-fence_ipmilan-5254004d7139-compute-1--10000)
      Resource: stonith-fence_ipmilan-525400b77dcc
        Disabled on: controller-1 (score:-10000) (id:location-stonith-fence_ipmilan-525400b77dcc-controller-1--10000)
      Resource: stonith-fence_ipmilan-525400bb6781
        Disabled on: controller-2 (score:-10000) (id:location-stonith-fence_ipmilan-525400bb6781-controller-2--10000)

    Suggested-by: Ken Gaillot <email address hidden>

    Closes-Bug: #1829146
    Change-Id: I95d11d85d61bddc6d8600f576801a42af79a6652

Changed in puppet-pacemaker:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-pacemaker 0.8.0

This issue was fixed in the openstack/puppet-pacemaker 0.8.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.