Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-69645

MAPO creates events when reconciling machines

XMLWordPrintable

    • None
    • False
    • Hide

      None

      Show
      None
    • 1
    • Moderate
    • None
    • None
    • None
    • ShiftStack Sprint 281
    • 1
    • In Progress
    • Bug Fix
    • Hide
      Cause: MAPO creates an event for each reconcile when it should only create events for significant state changes like creation, update, or deletion.

      Consequence: The excessive event generation can lead to noise in event logs, potential performance overhead, and disruption of monitoring and alerting systems.

      Fix: Modified the reconcile function to capture the original ResourceVersion and only emit an "Updated" event when the machine ResourceVersion changes, indicating an actual modification. Changed the event name from "Reconciled" to "Updated" to align with other machine API providers.

      Result: MAPO no longer creates unnecessary events during reconciliation cycles. Events are only recorded when the machine is actually updated, reducing event log noise and aligning behavior with other providers.
      Show
      Cause: MAPO creates an event for each reconcile when it should only create events for significant state changes like creation, update, or deletion. Consequence: The excessive event generation can lead to noise in event logs, potential performance overhead, and disruption of monitoring and alerting systems. Fix: Modified the reconcile function to capture the original ResourceVersion and only emit an "Updated" event when the machine ResourceVersion changes, indicating an actual modification. Changed the event name from "Reconciled" to "Updated" to align with other machine API providers. Result: MAPO no longer creates unnecessary events during reconciliation cycles. Events are only recorded when the machine is actually updated, reducing event log noise and aligning behavior with other providers.
    • None
    • None
    • None
    • None

      This is a clone of issue OCPBUGS-69644. The following is the description of the original issue:

      This is a clone of issue OCPBUGS-67298. The following is the description of the original issue:

      As seen in the ovn-serial jobs, the test [sig-arch] events should not repeat pathologically for ns/openshift-machine-api fails with:

      {  1 events happened too frequently
      
      event happened 21 times, something is wrong: namespace/openshift-machine-api hmsg/c0adc236e5 machine/k2yrry07-92bf1-wbbqt-worker-0-c85q8 - reason/Reconciled Reconciled machine k2yrry07-92bf1-wbbqt-worker-0-c85q8 (01:41:41Z) result=reject }
      

      That's because MAPO creates an event for each reconcile. We should only create events for Creation / Update / Deletion, as other providers do.

      https://prow.ci.openshift.org/view/gs/test-platform-results/logs/periodic-ci-shiftstack-ci-release-4.20-e2e-openstack-ovn-serial/1999236006368251904

              maandre@redhat.com Martin André
              maandre@redhat.com Martin André
              None
              None
              Itay Matza Itay Matza
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: