Uploaded image for project: 'OpenShift Logging'
  1. OpenShift Logging
  2. LOG-7821

Unable to reconcile LogFileMetricExporter when migrating from Logging 5 to 6

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • Logging 6.1.8, Logging 6.2.5
    • Log Collection
    • Incidents & Support
    • False
    • Hide

      None

      Show
      None
    • False
    • NEW
    • NEW
    • Bug Fix
    • Low

      Description of problem:

      Following the Red Hat Documentation to migrate from Logging 5 to Logging 6, once it's upgraded the Cluster Logging Operator, the Logging Operator pod indicates an error where not able to reconcile the  LogFileMetricExporter

       {"_ts":"2025-10-08T08:27:06.974372338Z","_level":"0","_component":"cluster-logging-operator","_message":"Reconciler error","LogFileMetricExporter":{"name":"instance","namespace":"openshift-logging"},"_error":{"msg":"Unable to reconcile LogFileMetricExporter: DaemonSet.apps \"logfilesmetricexporter\" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{\"app.kubernetes.io/component\":\"logfilesmetricexporter\", \"app.kubernetes.io/instance\":\"instance\", \"app.kubernetes.io/managed-by\":\"cluster-logging-operator\", \"app.kubernetes.io/name\":\"logfilesmetricexporter\", \"app.kubernetes.io/part-of\":\"cluster-logging\"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable"},"controller":"logfilemetricexporter","controllerGroup":"logging.openshift.io","controllerKind":"LogFileMetricExporter","name":"instance","namespace":"openshift-logging","reconcileID":"239e8009-9464-4ebc-b02c-8f7d393ad68e"}
      

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

      Upgrade from Logging 5.8 or 5.9 to Logging 6.1.8 and 6.2.5

      How reproducible:

      Always

      Steps to Reproduce:

      1. Have installed Logging 5.8 or 5.9 with the LogFileMetricExporter CR created
        apiVersion: logging.openshift.io/v1alpha1
        kind: LogFileMetricExporter
        metadata:
          name: instance
          namespace: openshift-logging
        spec:
          nodeSelector: {}
          resources:
            limits:
              cpu: 500m
              memory: 256Mi
            requests:
              cpu: 200m
              memory: 128Mi
          tolerations: []
        
      2.  Upgrade to Logging 6.y as documented in the Red Hat Documentation

      Actual results:

      The logging operator pod throws an error where not able to reconcile the "logfilemetricexporter" daemonset

      {"_ts":"2025-10-08T09:28:07.099724411Z","_level":"0","_component":"cluster-logging-operator","_message":"Reconciler error","LogFileMetricExporter":{"name":"instance","namespace":"openshift-logging"},"_error":{"msg":"Unable to reconcile LogFileMetricExporter: DaemonSet.apps \"logfilesmetricexporter\" is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{\"app.kubernetes.io/component\":\"logfilesmetricexporter\", \"app.kubernetes.io/instance\":\"instance\", \"app.kubernetes.io/managed-by\":\"cluster-logging-operator\", \"app.kubernetes.io/name\":\"logfilesmetricexporter\", \"app.kubernetes.io/part-of\":\"cluster-logging\"}, MatchExpressions:[]v1.LabelSelectorRequirement(nil)}: field is immutable"},"controller":"logfilemetricexporter","controllerGroup":"logging.openshift.io","controllerKind":"LogFileMetricExporter","name":"instance","namespace":"openshift-logging","reconcileID":"c6c7f0d9-f0f3-46fb-add6-f61fa98033ad"}
      
      

      Expected results:

      The "logfilemetricexporter" daemonset gets updated by the Logging Operator and not erro visible in the Logging Operator pod

      Workaround

      Delete the "logfilemetricexporter" daemonset and it will get recreated by the Logging Operator:

      $ oc get daemonset logfilesmetricexporter -n openshift-logging
      

      If this issue is known by the OpenShift admin before upgrading to Logging 6, then:

      1. delete the logfilemetricexporters CR before upgrading
        $ oc delete logfilemetricexporters instance -n openshift-logging
        
      2. recreate once upgraded the Logging Operator
        $ cat logfilemetrics.yaml 
        apiVersion: logging.openshift.io/v1alpha1
        kind: LogFileMetricExporter
        metadata:
          name: instance
          namespace: openshift-logging
        spec:
          nodeSelector: {}
          resources:
            limits:
              cpu: 500m
              memory: 256Mi
            requests:
              cpu: 200m
              memory: 128Mi
          tolerations: []
        
        $ oc create -f logfilemetrics.yaml 
        

        Additional info:

              Unassigned Unassigned
              rhn-support-ocasalsa Oscar Casal Sanchez
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: