Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-84511

Can't create colocation constraint with "influence=false" in a cluster with old CIB schema

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-9.6, rhel-10.0
    • pcs
    • None
    • No
    • Moderate
    • rhel-ha
    • 10
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      I was trying to create colocation constraint with "influence=false" in a cluster with old CIB schema.

      What is the impact of this issue to you?

      Tests for colocation influence are failing.

      Please provide the package NVR for which the bug is seen:

      pcs-0.11.9-2.el9.x86_64
      pacemaker-2.1.9-1.el9.x86_64

      How reproducible is this bug?:

      easily, always

      Steps to reproduce

      • have cluster with 2 resources:
      [root@hvirt-352 ~]# pcs status
      Cluster name: STSRHTS19202
      Cluster Summary:
        * Stack: corosync (Pacemaker is running)
        * Current DC: hvirt-352 (version 2.1.9-1.el9-49aab9983) - partition with quorum
        * Last updated: Fri Mar 21 13:03:07 2025 on hvirt-352
        * Last change:  Fri Mar 21 13:03:01 2025 by root via root on hvirt-352
        * 3 nodes configured
        * 5 resource instances configured
      
      Node List:
        * Online: [ hvirt-343 hvirt-349 hvirt-352 ]
      
      Full List of Resources:
        * fence-hvirt-352	(stonith:fence_virt):	 Started hvirt-343
        * fence-hvirt-349	(stonith:fence_virt):	 Started hvirt-349
        * fence-hvirt-343	(stonith:fence_virt):	 Started hvirt-352
        * d1	(ocf:pacemaker:Dummy):	 Started hvirt-343
        * d2	(ocf:pacemaker:Dummy):	 Started hvirt-349
      
      Daemon Status:
        corosync: active/disabled
        pacemaker: active/disabled
        pcsd: active/enabled
      
      • have CIB with older schema (validate-with="pacemaker-3.1"):
      [root@hvirt-352 ~]# pcs cluster cib | grep "validate-with"
      <cib crm_feature_set="3.19.6" validate-with="pacemaker-3.1" epoch="10" num_updates="11" admin_epoch="0" cib-last-written="Fri Mar 21 13:03:01 2025" update-origin="hvirt-352" update-client="root" update-user="root" have-quorum="1" dc-uuid="1">
      
      • try to create colocation constraint with parameter "influence=false":
      [root@hvirt-352 ~]# pcs constraint colocation add d1 with d2 influence='false'
      

      Expected results

      constraint is created

      Actual results

      pcs fails to create such constraint

      [root@hvirt-352 ~]# pcs constraint colocation add d1 with d2 influence='false'
      Error: Unable to update cib
      Call cib_replace failed: Update does not conform to the configured schema
      

      Additional info

      • create a copy of CIB with old schema:
      [root@hvirt-352 ~]# pcs cluster cib > cib1
      
      • update it with constraint:
          <constraints>
            <rsc_colocation rsc="d1" with-rsc="d2" score="INFINITY" influence="false" id="colocation-d1-d2-INFINITY"/>
          </constraints>
      
      • verify CIB:
      [root@hvirt-352 ~]# crm_verify --xml-file cib1 --verbose
      Invalid attribute influence for element rsc_colocation
      
      Element constraints has extra content: rsc_colocation
      
      error: CIB did not pass schema validation
      Errors found during check: config not valid
      
      • after upgrading CIB, constraint can be created:
      [root@hvirt-352 ~]# pcs cluster cib-upgrade
      Cluster CIB has been upgraded to latest version
      
      [root@hvirt-352 ~]# pcs cluster cib | grep "validate-with"
      <cib crm_feature_set="3.19.6" validate-with="pacemaker-3.10" epoch="6" num_updates="3" admin_epoch="1" cib-last-written="Fri Mar 21 13:29:46 2025" update-origin="hvirt-352" update-client="root" update-user="root" have-quorum="1" dc-uuid="1">
      
      [root@hvirt-352 ~]# pcs constraint colocation add d1 with d2 influence='false'
      [root@hvirt-352 ~]# pcs constraint
      Colocation Constraints:
        resource 'd1' with resource 'd2'
          score=INFINITY influence=false
      
      [root@hvirt-352 ~]# pcs status
      Cluster name: STSRHTS19202
      Cluster Summary:
        * Stack: corosync (Pacemaker is running)
        * Current DC: hvirt-352 (version 2.1.9-1.el9-49aab9983) - partition with quorum
        * Last updated: Fri Mar 21 13:29:52 2025 on hvirt-352
        * Last change:  Fri Mar 21 13:29:46 2025 by root via root on hvirt-352
        * 3 nodes configured
        * 5 resource instances configured
      
      Node List:
        * Online: [ hvirt-343 hvirt-349 hvirt-352 ]
      
      Full List of Resources:
        * fence-hvirt-352	(stonith:fence_virt):	 Started hvirt-343
        * fence-hvirt-349	(stonith:fence_virt):	 Started hvirt-349
        * fence-hvirt-343	(stonith:fence_virt):	 Started hvirt-352
        * d1	(ocf:pacemaker:Dummy):	 Started hvirt-349
        * d2	(ocf:pacemaker:Dummy):	 Started hvirt-349
      
      Daemon Status:
        corosync: active/disabled
        pacemaker: active/disabled
        pcsd: active/enabled
      

              tojeline@redhat.com Tomas Jelinek
              rhn-support-msmazova Marketa Smazova
              Tomas Jelinek Tomas Jelinek
              Cluster QE Cluster QE
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: