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

HAProxy Log Length will take only destination type when both syslog and container is configured on default ingress controller

    XMLWordPrintable

Details

    • No
    • 2
    • Sprint 239, Sprint 240, Sprint 241, Sprint 242, Sprint 243, Sprint 244, Sprint 245
    • 7
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Release Note Not Required
    • In Progress

    Description

      Description of problem:

      During the testing of NE1264 epic, i configured both syslog and container destination type of logging on the same default ingress controller. In the ingress controller spec we can see, it is taking both the destination type, but it is not reflect in ROUTER_LOG_MAX_LENGTH env  or the haproxy.config file
      
      melvinjoseph@mjoseph-mac Downloads % oc -n openshift-ingress-operator get ingresscontroller/default -oyaml
      apiVersion: operator.openshift.io/v1
      kind: IngressController
      <-----snip--->
      spec:
        clientTLS:
          clientCA:
            name: ""
          clientCertificatePolicy: ""
        httpCompression: {}
        httpEmptyRequestsPolicy: Respond
        httpErrorCodePages:
          name: ""
        logging:
          access:
            destination:
              container:
                maxLength: 1024
              syslog:
                address: 1.2.3.4
                maxLength: 1024
                port: 514
              type: Container
            logEmptyRequests: Log
        replicas: 2
        tuningOptions:
          reloadInterval: 0s
        unsupportedConfigOverrides: null
      
      
      
      melvinjoseph@mjoseph-mac Downloads % oc -n openshift-ingress exec router-default-6c86ff75d9-g24q5    -- env | grep ROUTER_LOG_MAX_LENGTH
      Defaulted container "router" out of: router, logs
      ROUTER_LOG_MAX_LENGTH=1024
      melvinjoseph@mjoseph-mac Downloads % oc -n openshift-ingress exec router-default-6c86ff75d9-l9rjv -- cat haproxy.config | grep 1024  
      Defaulted container "router" out of: router, logs
        log /var/lib/rsyslog/rsyslog.sock len 1024 local1 info
      
      
      when we patch changes to log length, it is not reflect as expected for one destination.
      
      melvinjoseph@mjoseph-mac Downloads % oc -n openshift-ingress-operator patch ingresscontroller/default -p '{"spec":{"logging":{"access":{"destination":{"container":{"maxLength":480}}}}}}' --type=merge
      ingresscontroller.operator.openshift.io/default patched
      melvinjoseph@mjoseph-mac Downloads % oc -n openshift-ingress exec router-default-6476d6c69d-tlhqd -- env | grep ROUTER_LOG_MAX_LENGTH    
      Defaulted container "router" out of: router, logs
      ROUTER_LOG_MAX_LENGTH=480
      
      
      melvinjoseph@mjoseph-mac Downloads % oc -n openshift-ingress-operator patch ingresscontroller/default -p '{"spec":{"logging":{"access":{"destination":{"syslog":{"maxLength":4096}}}}}}' --type=merge
      ingresscontroller.operator.openshift.io/default patched
      
      melvinjoseph@mjoseph-mac Downloads % oc -n openshift-ingress-operator get ingresscontroller/default -oyaml                                                                                    
      apiVersion: operator.openshift.io/v1
      kind: IngressController
      <----snip---->
      spec:
        clientTLS:
          clientCA:
            name: ""
          clientCertificatePolicy: ""
        httpCompression: {}
        httpEmptyRequestsPolicy: Respond
        httpErrorCodePages:
          name: ""
        logging:
          access:
            destination:
              container:
                maxLength: 480
              syslog:
                address: 1.2.3.4
                maxLength: 4096
                port: 514
              type: Container
            logEmptyRequests: Log
        replicas: 2
        tuningOptions:
          reloadInterval: 0s
        unsupportedConfigOverrides: null
      
      
      melvinjoseph@mjoseph-mac Downloads % oc -n openshift-ingress exec router-default-59cf55666d-shq98 -- env | grep ROUTER_LOG_MAX_LENGTH 
      Defaulted container "router" out of: router, logs
      ROUTER_LOG_MAX_LENGTH=480
      
      
      In another round of testing i can see only the syslog destination type is reflecting on env and not the container destination type.
      
      I am also not sure whether it is a valid situation where we can use both type of destination  type on default ingress controller. 

       

       

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

      4.14

      How reproducible:

       

      Steps to Reproduce:

      1. Edit the default ingress controller and add both destination type configs
      2.
      3.
      

      Actual results:

      Either one type value is only reflecting in the haproxy.config file

      Expected results:

      Both type should we reflected

      Additional info:

       

      Attachments

        Issue Links

          Activity

            People

              mmasters1@redhat.com Miciah Masters
              rhn-support-mjoseph Melvin Joseph
              Melvin Joseph Melvin Joseph
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: