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

nodeip-configuration returns addresses in non-deterministic order

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 4.20
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In https://github.com/openshift/baremetal-runtimecfg/blob/e898adc576b343a214aff860e349f9bba3a125d4/pkg/utils/addresses.go#L267 we have a logic that sorts and returns IP addresses that are suitable for use as Node IP.

      The logic is fairly robust for IPv4 systems where it's natural that an interface holds only single IP address from a single subnet.

      However, this statement does not hold any more in IPv6 systems where it is natural for an interface to hold multiple IP addresses from the same subnet, e.g.

      3: enp0s13f0u1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
          inet6 fde3:886c:56e8:a::628/128 scope global dynamic noprefixroute
             valid_lft 38796sec preferred_lft 38796sec
          inet6 2001:1708:4840:740a::628/128 scope global dynamic noprefixroute
             valid_lft 38796sec preferred_lft 38796sec
          inet6 2001:1708:4840:740a:8ded:2839:b2a8:53ae/64 scope global dynamic noprefixroute
             valid_lft 65856sec preferred_lft 65856sec
          inet6 fde3:886c:56e8:a:8d98:85a5:487b:3ab6/64 scope global noprefixroute
             valid_lft forever preferred_lft 604512sec
          inet6 fe80::e14b:aef0:2455:f355/64 scope link noprefixroute
             valid_lft forever preferred_lft forever
      

      is a correct configuration even though enp0s13f0u1 has more than 1 public v6 address with the 2001:1708:4840:740a prefix.

      Right now in OCP we explicitly forbid such a configuration. But should we for real? I would rather change our logic so that the list we return is always stable and e.g. sorted alphanumerically. That way even if you have more than 1 matching IPv6 address, we will always pick the same one and pass it to kubelet&co.

              rh-ee-edesch Emilia Desch
              mkowalsk@redhat.com Mat Kowalski
              None
              None
              Ross Brattain Ross Brattain
              None
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: