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

Monitoring-plugin can not start on IPv6 disabled cluster

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Normal Normal
    • 4.14.z
    • 4.14.0
    • Monitoring
    • Important
    • No
    • False
    • Hide

      None

      Show
      None

      This is a clone of issue OCPBUGS-21610. The following is the description of the original issue:

      Description of problem:

      monitoring-plugin can not be started on IPv6 disabled cluster as the pod listen on [::]:9443. 
      
      Monitoring-plugin should listen on [::]:9443 on IPv6 enabled cluster
      Monitoring-plugin should listen on 0.0.0.0:9443 on IPv6 disabled cluster.
      
      
      $oc logs monitoring-plugin-dc84478c-5rwmm2023/10/14 13:42:41 [emerg] 1#0: socket() [::]:9443 failed (97: Address family not supported by protocol)nginx: [emerg] socket() [::]:9443 failed (97: Address family not supported

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

      4.14.0-rc.5

      How reproducible:

      Always

      Steps to Reproduce:

      1) disable ipv6 following   https://access.redhat.com/solutions/5513111

      cat <<EOF |oc create -f -
      apiVersion: machineconfiguration.openshift.io
      kind: MachineConfig
      metadata:
        labels:
          machineconfiguration.openshift.io/role: master
        name: 99-openshift-machineconfig-master-kargs
      spec:
        kernelArguments:
        - ipv6.disable=1
      EOF
       
      cat <<EOF |oc create -f -
      apiVersion: machineconfiguration.openshift.io/v1
      kind: MachineConfig
      metadata:
        labels:
      machineconfiguration.openshift.io/role: worker
        name: 99-openshift-machineconfig-worker-kargs
      spec:
        kernelArguments:
         -  ipv6.disable=1
      EOF

      2) Check the mcp status

      3) Check the monitoring plugin pod status

      Actual results:
      1) mcp is pending as monitor-plugin pod can not be schedule

       

      $ oc get mcp |grep worker.
      worker   rendered-worker-ba1d1b8306f65bc5ff53b0c05a54143f   False     True       False      5              3                   3                     0                      3h59m
      

       

       

      $oc logs machine-config-controller-5b96788c69-j9d7k
      I1014 13:05:57.767217       1 drain_controller.go:350] Previous node drain found. Drain has been going on for 0.025260005567777778 hours
      I1014 13:05:57.767228       1 drain_controller.go:173] node anlim14-c6jbb-worker-b-rgqq5.c.openshift-qe.internal: initiating drain
      E1014 13:05:58.411241       1 drain_controller.go:144] WARNING: ignoring DaemonSet-managed ……
      I1014 13:05:58.413116       1 drain_controller.go:144] evicting pod openshift-monitoring/monitoring-plugin-dc84478c-92xr4
      E1014 13:05:58.422164       1 drain_controller.go:144] error when evicting pods/"monitoring-plugin-dc84478c-92xr4" -n "openshift-monitoring" (will retry after 5s): Cannot evict pod as it would violate the pod's disruption budget.
      I1014 13:06:03.422338       1 drain_controller.go:144] evicting pod openshift-monitoring/monitoring-plugin-dc84478c-92xr4
      E1014 13:06:03.433295       1 drain_controller.go:144] error when evicting pods/"monitoring-plugin-dc84478c-92xr4" -n "openshift-monitoring" (will retry after 5s): Cannot evict pod as it would violate the pod's disruption budget.
      

       

      2) monitoring-plugin pod listen on [::]  which is an invalid address on IPv6 disabled cluster.

       

      $oc extract cm/monitoring-plugin
      $cat nginx.conf 
      error_log /dev/stdout info;
      events {}
      http {
        include            /etc/nginx/mime.types;
        default_type       application/octet-stream;
        keepalive_timeout  65;
        server {
          listen              9443 ssl;
          listen              [::]:9443 ssl;
          ssl_certificate     /var/cert/tls.crt;
          ssl_certificate_key /var/cert/tls.key;
          root                /usr/share/nginx/html;
        }
      }

      Expected results:

      Monitoring-plugin listens on [::]:9443 on IPv6 enabled cluster
      Monitoring-plugin listens on 0.0.0.0:9443 on IPv6 disabled cluster.

      Additional info:

      The PR about how logging fix this issue. https://github.com/openshift/cluster-logging-operator/pull/2207/files#diff-dc6205a02c6c783e022ae0d4c726327bee4ef34cd1361541d1e3165ee7056b38R43

            spasquie@redhat.com Simon Pasquier
            openshift-crt-jira-prow OpenShift Prow Bot
            Tai Gao Tai Gao
            Ayoub Mrini
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: