Deleting a Pacemaker constraint removes a scheduling rule that forces a resource onto specific nodes or enforces ordering and colocation between resources. Clearing obsolete rules helps prevent resources from being pinned to failed nodes, stuck behind old ordering chains, or kept apart by constraints that no longer match the cluster design.
Constraints are stored in the cluster configuration and referenced by a unique constraint ID. The pcs command shows constraint definitions and exposes those IDs, which are required to delete the correct rule regardless of whether it is a location, order, or colocation constraint.
Constraint removal takes effect immediately and can trigger a new placement calculation, which may move resources or change start order. Removing the wrong ID can cause unexpected failovers or service disruption, so the constraint entry should be reviewed carefully before deletion.
$ sudo pcs constraint config --full
Location Constraints:
resource 'web-service' prefers node 'node-02' with score 100 (id: location-web-service-node-02-100)
Colocation Constraints:
resource 'web-service' with resource 'cluster_ip' (id: colocation-web-service-cluster_ip-INFINITY)
score=INFINITY
Order Constraints:
start resource 'cluster_ip' then start resource 'web-service' (id: order-cluster_ip-web-service-mandatory)
Use the value after id: as the removal target.
$ sudo pcs constraint remove location-web-service-node-02-100
Removing a constraint can trigger immediate resource moves or start/stop actions if the cluster recalculates placement.
$ sudo pcs constraint config --full
Colocation Constraints:
resource 'web-service' with resource 'cluster_ip' (id: colocation-web-service-cluster_ip-INFINITY)
score=INFINITY
Order Constraints:
start resource 'cluster_ip' then start resource 'web-service' (id: order-cluster_ip-web-service-mandatory)
Quick check by filtering for the deleted ID: pcs constraint config --full | grep -F location-web-service-node-02-100.
$ sudo pcs status Cluster name: clustername Cluster Summary: * Stack: corosync (Pacemaker is running) * Current DC: node-03 (version 2.1.6-6fdc9deea29) - partition with quorum * Last updated: Wed Dec 31 09:05:48 2025 on node-01 * Last change: Wed Dec 31 09:05:48 2025 by root via cibadmin on node-01 * 3 nodes configured * 2 resource instances configured Node List: * Online: [ node-01 node-02 node-03 ] Full List of Resources: * cluster_ip (ocf:heartbeat:IPaddr2): Started node-02 * web-service (systemd:nginx): Started node-02 Daemon Status: corosync: active/enabled pacemaker: active/enabled pcsd: active/enabled