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

Missing logs for the gateway-labeler, gateway-service-dns, and gatewayclass controllers

XMLWordPrintable

    • None
    • False
    • Hide

      None

      Show
      None
    • 2
    • Important
    • Yes
    • Rejected
    • NI&D Sprint 281
    • 1
    • In Progress
    • Bug Fix
    • Hide
      Cause: A change in the controller-runtime library in OpenShift 4.21 caused logging not to be initialized for some of the operator's controllers.

      Consequence: The operator did not log the controller initialization or reconciliation errors for the gateway-labeler, gateway-service-dns, and gatewayclass controllers.

      Fix: The operator was updated to initialize logging for these controllers.

      Result: The operator now logs initialization and reconciliation errors for these controllers.
      Show
      Cause: A change in the controller-runtime library in OpenShift 4.21 caused logging not to be initialized for some of the operator's controllers. Consequence: The operator did not log the controller initialization or reconciliation errors for the gateway-labeler, gateway-service-dns, and gatewayclass controllers. Fix: The operator was updated to initialize logging for these controllers. Result: The operator now logs initialization and reconciliation errors for these controllers.
    • None
    • None
    • None
    • None

      Description of problem

      Initialization and reconciliation errors are not logged for the gateway-labeler, gateway-service-dns, and gatewayclass unmanaged controllers.

      Version-Release number of selected component (if applicable)

      OpenShift 4.21.0.

      How reproducible

      100%.

      Steps to Reproduce

      1. Create a GatewayClass CR with the "openshift.io/gateway-controller/v1" controller name.
      2. Check the operator logs.

      Actual results

      The operator does not log the initialization the gateway-labeler, gateway-service-dns, and gatewayclass controllers or any reconciliation errors from these controllers:

      % oc -n openshift-ingress-operator logs -c ingress-operator deployments/ingress-operator | grep -e Starting.Controller | grep -e gatewayclass_controller -e gateway_labeler_controller -e service_dns_controller
      zsh: done       oc -n openshift-ingress-operator logs -c ingress-operator  | grep -e Starting.Controller |
      zsh: exit 1     grep -e gatewayclass_controller -e gateway_labeler_controller -e
      %
      

      Expected results

      The initialization of each controller should be logged:

      2025-12-23T14:56:04.002-0500	INFO	operator.init	controller/controller.go:209	Starting Controller	{"controller": "gateway_labeler_controller"}
      2025-12-23T14:56:04.467-0500	INFO	operator.init	controller/controller.go:209	Starting Controller	{"controller": "gatewayclass_controller"}
      2025-12-23T14:56:04.468-0500	INFO	operator.init	controller/controller.go:209	Starting Controller	{"controller": "service_dns_controller"}
      

      Additionally, any reconciliation errors should be logged.

      Additional info

      This issue is caused by the bump to controller-runtime v0.21.0 (NE-2139).

      Before controller-runtime v0.21.0, controller-runtime implicitly set default values for controller options, including a logger, for managed and unmanaged controllers alike. Since controller-runtime v0.21.0, these default values are not implicitly set for unmanaged controllers. In particular, this means that the logger is not initialized, and so the controller initialization and any reconciliation errors are not logged.

      https://github.com/kubernetes-sigs/controller-runtime/commit/d9ff283bfe844e8e3806eb2d264b2a6fa7815f66 is the specific commit in controller-runtime that removes the implicit setting of default values for controller options.

              mmasters1@redhat.com Miciah Masters
              mmasters1@redhat.com Miciah Masters
              None
              None
              Ishmam Amin Ishmam Amin
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: