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

Don't update lastTransitionTime unless condition status changes

    XMLWordPrintable

Details

    • No
    • 2
    • Sprint 241, Sprint 242
    • 2
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      Cause: Previously, the DNS Operator updated its ClusterOperator status conditions' `lastTransitionTime` field whenever the status, reason, or message changed on a particular status condition.

      Consequence: The dns ClusterOperator status could have misled cluster-admins who assumed that a status condition's `lastTransitionTime` field would only be updated when the status condition's status changed.

      Fix: The DNS Operator now only updates `lastTransitionTime` if the status condition's status changes.

      Result: The dns ClusterOperator's status conditions' `lastTransitionTime` now accurately reflects when each status condition's status last changed.
      Show
      Cause: Previously, the DNS Operator updated its ClusterOperator status conditions' `lastTransitionTime` field whenever the status, reason, or message changed on a particular status condition. Consequence: The dns ClusterOperator status could have misled cluster-admins who assumed that a status condition's `lastTransitionTime` field would only be updated when the status condition's status changed. Fix: The DNS Operator now only updates `lastTransitionTime` if the status condition's status changes. Result: The dns ClusterOperator's status conditions' `lastTransitionTime` now accurately reflects when each status condition's status last changed.
    • Bug Fix
    • Proposed

    Description

      Description of problem:

      Fixed by @wking, opening bug for Jira linking.
      
      The cluster-dns-operator sets the status condition's lastTransitionTime whenever the status (true, false, unknown), reason, or message changed on a condition.  
      
      It should only set the lastTransitionTime if the condition status changes. Otherwise this can have an affect on status flapping between true and false.  See https://github.com/openshift/api/blob/master/config/v1/types_cluster_operator.go#L129

      Version-Release number of selected component (if applicable):

      4.15 and earlier

      How reproducible:

      100%

      Steps to Reproduce:

      1. Put cluster-dns-operator in a Degraded condition by stopping a pod, notice the lastTransitionTime
      2. Wait 1 second and stop another pod, which only updates the condition message
      

      Actual results:

      Notice the lastTransitionTime for the Degraded condition changes when the message changes, even though the status is still Degraded=true

      Expected results:

      The lastTransitionTime should not change unless the Degraded status changes, not the message or reason.

      Additional info:

       

      Attachments

        Activity

          People

            mmasters1@redhat.com Miciah Masters
            cholman@redhat.com Candace Holman
            Melvin Joseph Melvin Joseph
            W. Trevor King
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: