Page MenuHomeClusterLabs Projects

Fix regression in CIB alerts change detection
Closed (Released)Public

Assigned To
Authored By
kgaillot
Aug 21 2024, 12:49 PM
Tags
  • Restricted Project
  • Restricted Project
  • Restricted Project
  • Restricted Project
  • Restricted Project
  • Restricted Project
Referenced Files
None
Subscribers

Description

Example patchset:

<diff format="2">
     <version>
       <source admin_epoch="0" epoch="149" num_updates="93"/>
       <target admin_epoch="0" epoch="150" num_updates="0"/>
     </version>
     <change operation="modify" path="/cib">
       <change-list>
         <change-attr name="epoch" operation="set" value="150"/>
         <change-attr name="num_updates" operation="set" value="0
"/>
       </change-list>
       <change-result>
         <cib crm_feature_set="3.19.7" validate-with="pacemaker-4
.0" epoch="150" num_updates="0" admin_epoch="0" cib-last-written="Wed Aug 21 11:06:36 2024" have-quorum="1" update-origin="rhel9-2" update-client="root" update-user="root" dc-uu
id="2"/>
       </change-result>
     </change>
     <change operation="create" path="/cib/configuration" positio
n="7">
       <alerts>
         <alert id="alert-1" path="/var/lib/pacemaker/notify.sh">
           <recipient id="alert-1-recipient-1" value="/run/crm/pacemaker-alerts.log"/>
         </alert>
       </alerts>
     </change>
</diff>

20ad1a97 (2.1.7) created cib__element_in_patchset() to replace alert change detection. It looks for PCMK__XA_CIB_OP when it's actually PCMK_XA_OPERATION.

To do:

  • Create a bunch of example patchsets (using the patchset code, not manually) for all possible syntax that patchsets can have
  • Move cib__element_in_patchset() to lib/common/patchset.c
  • Create unit tests for it using the example patchsets
  • Fix the detection
  • Merge in main then backport to 2.1

See also:

Event Timeline

kgaillot triaged this task as Unbreak Now! priority.Aug 21 2024, 12:49 PM
kgaillot created this task.
kgaillot created this object with edit policy "Restricted Project (Project)".
kgaillot added a project: Restricted Project.
kgaillot added a project: Restricted Project.
kgaillot renamed this task from Fix regression in CIB change detection to Fix regression in CIB alerts change detection.Aug 21 2024, 3:27 PM
kgaillot updated the task description. (Show Details)
kgaillot lowered the priority of this task from Unbreak Now! to High.Aug 21 2024, 3:37 PM
kgaillot edited projects, added Restricted Project; removed Restricted Project.Aug 21 2024, 4:07 PM
kgaillot moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Aug 21 2024, 4:37 PM
kgaillot changed the task status from Merged to Released.Thu, Oct 31, 5:14 PM