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

spec.outputs.<output>.http.timeout is not honered when the collector type is fluentd

    • False
    • None
    • False
    • NEW
    • VERIFIED
    • Hide
      Before this update, the clusterlogforwarder.spec.outputs.http.timeout parameter was not translated to the Fluentd configuration when Fluentd was used as the collector type. As a result, HTTP timeouts were not being properly configured, leading to potential issues with connection management. With this change the clusterlogforwarder.spec.outputs.http.timeout is now correctly translated to the Fluentd configuration. Fluentd will now honor the specified timeout, ensuring better handling of HTTP connections according to the userโ€™s configuration.
      Show
      Before this update, the clusterlogforwarder.spec.outputs.http.timeout parameter was not translated to the Fluentd configuration when Fluentd was used as the collector type. As a result, HTTP timeouts were not being properly configured, leading to potential issues with connection management. With this change the clusterlogforwarder.spec.outputs.http.timeout is now correctly translated to the Fluentd configuration. Fluentd will now honor the specified timeout, ensuring better handling of HTTP connections according to the userโ€™s configuration.
    • Bug Fix
    • Log Collection - Sprint 259, Log Collection - Sprint 260
    • Moderate

      Description of problem:

      In the API is observed that available to be defined `clusterlogforwarder.spec.outputs.http.timeout`:

      $ oc explain clusterlogforwarder.spec.outputs.http.timeout
      GROUP:      logging.openshift.io
      KIND:       ClusterLogForwarder
      VERSION:    v1
      
      FIELD: timeout <integer>
      
      DESCRIPTION:
          Timeout specifies the Http request timeout in seconds. If not set, 10secs is
          used.
      

      If the collector type is `fluentd`:

      $ oc get clusterlogging instance -o jsonpath='{.spec.collection.type}'
      fluentd
      

      And defined `clusterlogforwarder.spec.outputs.http.timeout` for an `HTTP` output:

      $ oc get clusterlogforwarder instance -o jsonpath='{.spec.outputs[?(.type=="http")]}'|jq
      {
        "http": {
          "timeout": 20
        },
        "name": "httpout-app",
        "type": "http",
        "url": "http://server.example.com"
      }
      

      The variable is not honored as it doesn't defined in the fluentd configuration generated by the operator:

      $ oc get cm collector-config -o json|jq -r '.data."fluent.conf"'
      ...
        <match **>
          @type http
          endpoint http://server.example.com
          http_method post
          content_type application/x-ndjson
      
          <buffer>
      

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

      $ oc get csv -n openshift-logging
      NAME                                      DISPLAY                            VERSION   REPLACES                                  PHASE
      cluster-logging.v5.8.4                    Red Hat OpenShift Logging          5.8.4     cluster-logging.v5.8.3                    Succeeded
      

      How reproducible:

      Always

      Steps to Reproduce:

      1. Deploy Cluster Logging 5.8 latest z version
      2. Configure clusterLogging being the collector type fluentd
        $ oc get clusterlogging instance -o jsonpath='{.spec.collection.type}'
        fluentd
        
      3. Configure in the clusterLogForwarder an output defining `spec.outputs.<output>.http.timeout`
        apiVersion: logging.openshift.io/v1
        kind: ClusterLogForwarder
        metadata:
          name: instance 
          namespace: openshift-logging 
        spec:
          outputs:
            - name: httpout-app
              type: http
              url: http://server.example.com
              http:
                timeout: 20
          pipelines:
           - name: all 
             inputRefs:
             - infrastructure
             - application
             outputRefs:
              - httpout-app
        

      Actual results:

      The `clusterlogforwarder.spec.outputs.http.timeout` is not translated to the fluentd configuration

      Expected results:

      The `clusterlogforwarder.spec.outputs.http.timeout` is translated to the fluentd configuration

            [LOG-6125] spec.outputs.<output>.http.timeout is not honered when the collector type is fluentd

            Since the problem described in this issue should be resolved in a recent advisory, it has been closed.

            For information on the advisory (Moderate: Logging for Red Hat OpenShift - 5.9.7), and where to find the updated files, follow the link below.

            If the solution does not work for you, open a new bug report.
            https://access.redhat.com/errata/RHSA-2024:7324

            Errata Tool added a comment - Since the problem described in this issue should be resolved in a recent advisory, it has been closed. For information on the advisory (Moderate: Logging for Red Hat OpenShift - 5.9.7), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2024:7324

            Kabir Bharti added a comment - - edited

            Verified on cluster-logging-rhel9-operator/images/v5.9.7-3

            fluent.conf

            ....
              <match **>
                @type http
                endpoint http://fluentdserver.fluentdserver.svc:24224/logs/app
                http_method post
                content_type application/x-ndjson
                keepalive_timeout 20s
                headers {"h1":"v1","h2":"v2"}
            ....
            
            $ oc get clusterlogging instance -o jsonpath='{.spec.collection.type}'
            fluentd               

            Kabir Bharti added a comment - - edited Verified on cluster-logging-rhel9-operator/images/v5.9.7-3 fluent.conf ....   <match **>     @type http     endpoint http: //fluentdserver.fluentdserver.svc:24224/logs/app     http_method post     content_type application/x-ndjson     keepalive_timeout 20s     headers { "h1" : "v1" , "h2" : "v2" } .... $ oc get clusterlogging instance -o jsonpath= '{.spec.collection.type}' fluentd              

            GitLab CEE Bot added a comment - CPaaS Service Account mentioned this issue in merge request !4353 of openshift-logging / Log Collection Midstream on branch openshift-logging-5.9-rhel-9_ upstream _ec57e7aef2da8eb77933798aabcb30fd : Updated 2 upstream sources

            This issue requires Release Notes Text. Please modify the Release Note Text or set the Release Note Type to "Release Note Not Required"

            Jeffrey Cantrill added a comment - This issue requires Release Notes Text. Please modify the Release Note Text or set the Release Note Type to "Release Note Not Required"

              vparfono Vitalii Parfonov
              rhn-support-ocasalsa Oscar Casal Sanchez
              Kabir Bharti Kabir Bharti
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: