Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-6111

Status.Condition lastTransitionTime is not updated after a successful Reconciliation in some cases

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • ?
    • ?
    • ?
    • ?
    • Low
    • Compute

      First we changed to re-initialize all our Status.Conditions at the start of each Reconcile() call. Then we realized that it causes that the lastTransitionTime of the condition is updated at each Reconcile call even if the condition did not change during the Reconciliation. So we introduced a logic that saves the old conditions, re-initialize the conditions, run Reconcile, and at the end checks if the new condition status is the same as the saved one and if so copy back that lastTransitionTime from the saved version. This solved the issue of always updating the lastTransitionTime, but it introduced a new edge case:
      1. everything is reconciled and Ready
      2. something small changes like the a CronJob schedule
      3. the change is reconciled in a single Reconcile run and all the conditions goes from True to True state, so the new logic restore the old transition time but actually we should have a new transition time for the CronJobReadyCondition as we updated the CronJob with a new Schedule.

            Unassigned Unassigned
            rh-ee-bgibizer Balazs Gibizer
            rhos-dfg-compute
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: