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

Wrong NODE_IP when multiple ports on-prem

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 4.18.0
    • None
    • None
    • Proposed
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      When the node has multiple ports, baremetal-runtimecfg is smart and will use the IP on eth0 for NODE_IP used by kubelet. But since https://github.com/openshift/machine-config-operator/pull/4388 - we are now forcing it to be 0.0.0.0.     

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

      4.18, 4.17, 4.16    

      How reproducible:

      Install a cluster (standalone or hosted) where workers (or nodepools) have multiple ports (and addresses). Kubelet will be wrongly configure to listen on 0.0.0.0:
      
      /usr/bin/kubelet --config=/etc/kubernetes/kubelet.conf --bootstrap-kubeconfig=/etc/kubernetes/kubeconfig --kubeconfig=/var/lib/kubelet/kubeconfig --container-runtime-endpoint=/var/run/crio/crio.sock --runtime-cgroups=/system.slice/crio.service --node-labels=node-role.kubernetes.io/worker,node.openshift.io/os_id=rhcos, --node-ip=0.0.0.0 --address=0.0.0.0 --minimum-container-ttl-duration=6m0s --volume-plugin-dir=/etc/kubernetes/kubelet-plugins/volume/exec --cloud-provider=external --hostname-override=emacchi-hcp-sriov-msrxd --pod-infra-container-image=registry.ci.openshift.org/ocp/4.17-2024-08-14-124358@sha256:3152b2e42d8bb97baa03cf566b85914d7d6b420d7112611c3e44f6edf76de0dd --system-reserved=cpu=500m,memory=1Gi,ephemeral-storage=1Gi --v=2    

      Actual results:

      Kubelet listening on 0.0.0.0 instead of its primary IP.    

      Expected results:

      Kubelet should be listening on its primary IP found by baremetal-runtimecfg: https://github.com/openshift/baremetal-runtimecfg/blob/8371408693c86490b7b4d207aa6a732d15137757/cmd/runtimecfg/node-ip.go#L141   

            team-mco Team MCO
            emacchi@redhat.com Emilien Macchi
            Sergio Regidor de la Rosa Sergio Regidor de la Rosa
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: