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

Metal Day-1 When No Hostname is Provided by Either rDNS or DHCP, All Hosts are Named "localhost".

    XMLWordPrintable

Details

    • Important
    • 3
    • Metal Platform 234, Metal Platform 235, Metal Platform 236, Metal Platform 237, Metal Platform 238, Metal Platform 239, Metal Platform 240
    • 7
    • Rejected
    • Unspecified
    • Hide
      Previously, if the hostname of a bare-metal machine was not provided by either reverse DNS or DHCP, it would default to `localhost` during bare-metal cluster provisioning on installer-provisioned infrastructure. This issue caused Kubernetes node name conflicts and prevented the cluster from being deployed. Now, if the hostname is detected to be `localhost` the provisioning agent sets the persistent hostname to the name of the `BareMetalHost` object. (link:https://issues.redhat.com/browse/OCPBUGS-9072[*OCPBUGS-9072*])
      Show
      Previously, if the hostname of a bare-metal machine was not provided by either reverse DNS or DHCP, it would default to `localhost` during bare-metal cluster provisioning on installer-provisioned infrastructure. This issue caused Kubernetes node name conflicts and prevented the cluster from being deployed. Now, if the hostname is detected to be `localhost` the provisioning agent sets the persistent hostname to the name of the `BareMetalHost` object. (link: https://issues.redhat.com/browse/OCPBUGS-9072 [* OCPBUGS-9072 *])
    • Bug Fix
    • Done

    Description

      Platform:

      IPI on Baremetal

      What happened?

      In cases where no hostname is provided, host are automatically assigned the name "localhost" or "localhost.localdomain".

      [kni@provisionhost-0-0 ~]$ oc get nodes
      NAME STATUS ROLES AGE VERSION
      localhost.localdomain Ready master 31m v1.22.1+6859754
      master-0-1 Ready master 39m v1.22.1+6859754
      master-0-2 Ready master 39m v1.22.1+6859754
      worker-0-0 Ready worker 12m v1.22.1+6859754
      worker-0-1 Ready worker 12m v1.22.1+6859754

      What did you expect to happen?

      Having all hosts come up as localhost is the worst possible user experience, because they'll fail to form a cluster but you won't know why.

      However, we know the BMH name in the image-customization-controller, it would be possible to configure the ignition to set a default hostname if we don't have one from DHCP/DNS.

      If not, we should at least fail the installation with a specific error message to this situation.

      ----------
      30/01/22 - adding how to reproduce
      ----------

      How to Reproduce:

      1)prepare and installation with day-1 static ip.

      add to install-config uner one of the nodes:
      networkConfig:
      routes:
      config:

      • destination: 0.0.0.0/0
        next-hop-address: 192.168.123.1
        next-hop-interface: enp0s4
        dns-resolver:
        config:
        server:
      • 192.168.123.1
        interfaces:
      • name: enp0s4
        type: ethernet
        state: up
        ipv4:
        address:
      • ip: 192.168.123.110
        prefix-length: 24
        enabled: true

      2)Ensure a DNS PTR for the address IS NOT configured.

      3)create manifests and cluster from install-config.yaml

      installation should either:
      1)fail as early as possible, and provide some sort of feed back as to the fact that no hostname was provided.
      2)derive the Hostname from the bmh or the ignition files

      Attachments

        Issue Links

          Activity

            People

              rhn-engineering-dtantsur Dmitry Tantsur
              yporagpa yoav porag (Inactive)
              Jad Haj Yahya Jad Haj Yahya
              Red Hat Employee
              Votes:
              0 Vote for this issue
              Watchers:
              24 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: