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

Router can migrate to use LivenessProbe.TerminationGracePeriodSeconds

XMLWordPrintable

    • Moderate
    • None
    • Sprint 228
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      * Previously, in {product-title} 4.7.0 and 4.6.20 the Ingress Operator used an annotation for router pods that was specific for OpenShift as a temporary way to configure the liveness probe's grace period in order to fix a bug. As a result, OpenShift was required to carry a patch to implement the fix. With this update, the Ingress Operator uses `terminationGracePeriodSeconds` API field making the previous patch removable in future releases. (link:https://issues.redhat.com/browse/OCPBUGS-4703[*OCPBUGS-4703*])
      Show
      * Previously, in {product-title} 4.7.0 and 4.6.20 the Ingress Operator used an annotation for router pods that was specific for OpenShift as a temporary way to configure the liveness probe's grace period in order to fix a bug. As a result, OpenShift was required to carry a patch to implement the fix. With this update, the Ingress Operator uses `terminationGracePeriodSeconds` API field making the previous patch removable in future releases. (link: https://issues.redhat.com/browse/OCPBUGS-4703 [* OCPBUGS-4703 *])
    • Bug Fix
    • Done

      Description of problem

      In OpenShift 4.7.0 and 4.6.20, cluster-ingress-operator started using the OpenShift-specific unsupported.do-not-use.openshift.io/override-liveness-grace-period-seconds annotation for router pods as a short-term measure to configure the liveness probe's grace period in order to fix OCPBUGSM-20760 (BZ#1899941). This annotation is implemented by a carry patch in openshift/kubernetes.

      Since then, upstream Kubernetes has added a terminationGracePeriodSeconds API field to configure the liveness probe using a formal API (upstream doc reference). Using this API field will allow for the carry patch to be removed from openshift/kubernetes.

      Example:

      spec:
        terminationGracePeriodSeconds: 3600  # pod-level
        containers:
        - name: test
          image: ...
      
          ports:
          - name: liveness-port
            containerPort: 8080
            hostPort: 8080
      
          livenessProbe:
            httpGet:
              path: /healthz
              port: liveness-port
            failureThreshold: 1
            periodSeconds: 60
            # Override pod-level terminationGracePeriodSeconds #
            terminationGracePeriodSeconds: 10 
      

      Version-Release number of selected component (if applicable)

      OpenShift 4.13.

      How reproducible

      Always.

      Steps to Reproduce

      1. Check the annotation and API field on a running cluster: oc -n openshift-ingress get pods -Lingresscontroller.operator.openshift.io/deployment-ingresscontroller=default -o 'custom-columns=NAME:.medadata.name,ANNOTATION:.metadata.annotations.unsupported\.do-not-use\.openshift\.io\/override-liveness-grace-period-seconds,SPEC:.spec.containers[0].livenessProbe.terminationGracePeriodSeconds'

      Actual results

      The annotation is set, and the spec field is not:

      % oc -n openshift-ingress get pods -Lingresscontroller.operator.openshift.io/deployment-ingresscontroller=default -o 'custom-columns=NAME:.metadata.name,ANNOTATION:.metadata.annotations.unsupported\.do-not-use\.openshift\.io\/override-liveness-grace-period-seconds,SPEC:.spec.containers[0].livenessProbe.terminationGracePeriodSeconds'
      NAME                              ANNOTATION   SPEC
      router-default-677f956f8b-d5lqz   10           <none>
      router-default-677f956f8b-hntbb   10           <none>
      

      Expected results

      The annotation is not set, and the spec field is:

      % oc -n openshift-ingress get pods -Lingresscontroller.operator.openshift.io/deployment-ingresscontroller=default -o 'custom-columns=NAME:.metadata.name,ANNOTATION:.metadata.annotations.unsupported\.do-not-use\.openshift\.io\/override-liveness-grace-period-seconds,SPEC:.spec.containers[0].livenessProbe.terminationGracePeriodSeconds'
      NAME                              ANNOTATION   SPEC
      router-default-677f956f8b-d5lqz   <none>       10
      router-default-677f956f8b-hntbb   <none>       10
      

              mmasters1@redhat.com Miciah Masters
              rphillip@redhat.com Ryan Phillips
              Melvin Joseph Melvin Joseph
              Joe Aldinger Joe Aldinger
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: