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
The image provider receives the metadata of the PreprovisioningImage object, including its name (which is necessarily the same name as the BaremetalHost), which would be an appropriate default hostname: https://github.com/openshift/image-customization-controller/blob/main/vendor/github.com/metal3-io/baremetal-operator/pkg/imageprovider/imageprovider.go#L14 We should be able to add something to the Ignition to write this name to /etc/hostname relatively easily. We only want to do this if the hostname is not already set by DHCP or DNS - setting it in a NetworkManger dispatcher script would certainly ensure it happens after DHCP; it's less clear to me whether this will also trigger at the right time if there is a hostname obtainable by DNS, or if we need to explicitly check that. Some experimentation would be required.
When running from the entrypoint used by the installer, the name of the static input file is the name of the corresponding control plane BaremetalHost (with .yaml appended), so we can do it from there also.
I have edited the install-config.yaml, without configuring the DNS-PTR for the address. while the installation fails this time (instead of completing successfully as it had before), There is no explicit error message or indication for the problem, and the node is still created with the name "localhost". I don't think that is sufficient to set the bug to verified. moving back to assigned
ERROR Bootstrap failed to complete: timed out waiting for the condition ERROR Failed to wait for bootstrapping to complete. This error usually happens when there is a problem with control plane hosts that prevents the control plane operators from creating the control plane. FATAL Bootstrap failed to complete [kni@provisionhost-0-0 ~]$ oc get nodes NAME STATUS ROLES AGE VERSION localhost Ready master 27m v1.23.3+b63be7f master-0-1 NotReady master 29m v1.23.3+b63be7f master-0-2 NotReady master 29m v1.23.3+b63be7f [core@localhost ~]$ sudo podman logs 9ef6bc8e46c0 {"level":"info","ts":1643630007.8435817,"logger":"static-server","msg":"Go Version: go1.17.2"} {"level":"info","ts":1643630007.8436332,"logger":"static-server","msg":"Go OS/Arch: linux/amd64"} {"level":"info","ts":1643630007.8436408,"logger":"static-server","msg":"Git commit: unknown"} {"level":"info","ts":1643630007.8436496,"logger":"static-server","msg":"Build time: unknown"} {"level":"info","ts":1643630007.8436558,"logger":"static-server","msg":"Component: openshift/image-customization-controller was not built with version info"} {"level":"info","ts":1643630008.355488,"logger":"static-server","msg":"serving","image":"openshift-master-0-0.iso","url":"http://0.0.0.0:8084/openshift-master-0-0.iso"} {"level":"info","ts":1643630008.3556366,"logger":"static-server","msg":"serving","image":"openshift-master-0-0.initramfs","url":"http://0.0.0.0:8084/openshift-master-0-0.initramfs"} {"level":"info","ts":1643630008.3561387,"logger":"static-server","msg":"serving","image":"openshift-master-0-1.iso","url":"http://0.0.0.0:8084/openshift-master-0-1.iso"} {"level":"info","ts":1643630008.3561807,"logger":"static-server","msg":"serving","image":"openshift-master-0-1.initramfs","url":"http://0.0.0.0:8084/openshift-master-0-1.initramfs"} {"level":"info","ts":1643630008.356444,"logger":"static-server","msg":"serving","image":"openshift-master-0-2.iso","url":"http://0.0.0.0:8084/openshift-master-0-2.iso"} {"level":"info","ts":1643630008.3564823,"logger":"static-server","msg":"serving","image":"openshift-master-0-2.initramfs","url":"http://0.0.0.0:8084/openshift-master-0-2.initramfs"} {"level":"info","ts":1643630008.3567357,"logger":"static-server","msg":"serving","image":"openshift-worker-0-0.iso","url":"http://0.0.0.0:8084/openshift-worker-0-0.iso"} {"level":"info","ts":1643630008.3567905,"logger":"static-server","msg":"serving","image":"openshift-worker-0-0.initramfs","url":"http://0.0.0.0:8084/openshift-worker-0-0.initramfs"} {"level":"info","ts":1643630008.3571296,"logger":"static-server","msg":"serving","image":"openshift-worker-0-1.iso","url":"http://0.0.0.0:8084/openshift-worker-0-1.iso"} {"level":"info","ts":1643630008.3571677,"logger":"static-server","msg":"serving","image":"openshift-worker-0-1.initramfs","url":"http://0.0.0.0:8084/openshift-worker-0-1.initramfs"} {"level":"info","ts":1643630030.5585206,"logger":"ImageHandler","msg":"Open","path":"/openshift-master-0-2.initramfs"} {"level":"info","ts":1643630030.7225447,"logger":"ImageHandler","msg":"Open","path":"/openshift-master-0-2.initramfs"} {"level":"info","ts":1643630030.7463865,"logger":"ImageHandler","msg":"Open","path":"/openshift-master-0-0.initramfs"} {"level":"info","ts":1643630030.7696705,"logger":"ImageHandler","msg":"Open","path":"/openshift-master-0-0.initramfs"} {"level":"info","ts":1643630030.7697961,"logger":"ImageHandler","msg":"Open","path":"/openshift-master-0-1.initramfs"} {"level":"info","ts":1643630030.7961042,"logger":"ImageHandler","msg":"Open","path":"/openshift-master-0-1.initramfs"} {"level":"info","ts":1643630197.1033564,"logger":"ImageHandler","msg":"Open","path":"/openshift-master-0-2.initramfs"} {"level":"info","ts":1643630197.1231475,"logger":"ImageHandler","msg":"Open","path":"/openshift-master-0-2.initramfs"} {"level":"info","ts":1643630197.1340601,"logger":"ImageHandler","msg":"Open","path":"/openshift-master-0-2.initramfs"} {"level":"info","ts":1643630197.2827077,"logger":"ImageHandler","msg":"Open","path":"/openshift-master-0-1.initramfs"} {"level":"info","ts":1643630197.290072,"logger":"ImageHandler","msg":"Open","path":"/openshift-master-0-1.initramfs"} {"level":"info","ts":1643630197.2976463,"logger":"ImageHandler","msg":"Open","path":"/openshift-master-0-1.initramfs"} {"level":"info","ts":1643630197.445514,"logger":"ImageHandler","msg":"Open","path":"/openshift-master-0-0.initramfs"} {"level":"info","ts":1643630197.455529,"logger":"ImageHandler","msg":"Open","path":"/openshift-master-0-0.initramfs"} {"level":"info","ts":1643630197.4720442,"logger":"ImageHandler","msg":"Open","path":"/openshift-master-0-0.initramfs"}
The patch was not available in any nightly build at the time of comment #5, so this just needs retesting. If a bug fails QA, please include the version tested so that we can determine which relevant patches are included.
@sdasu @
Setup installation without pre-configuring dns-ptr. added to master-0-0 in install-config.yaml: 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.160 prefix-length: 24 enabled: true dhcp: false Installation has completed successfully, behavior remains unchanged. [kni@provisionhost-0-0 ~]$ oc get nodes NAME STATUS ROLES AGE VERSION localhost Ready master 25m v1.23.3+d99c04f master-0-1 Ready master 34m v1.23.3+d99c04f master-0-2 Ready master 34m v1.23.3+d99c04f worker-0-0 Ready worker 14m v1.23.3+d99c04f worker-0-1 Ready worker 14m v1.23.3+d99c04f [kni@provisionhost-0-0 ~]$ oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.11.0-0.nightly-2022-02-07-154612 True False 2m49s Cluster version is 4.11.0-0.nightly-2022-02-07-154612 setting the bug back to ASSIGNED
*** Bug 1859578 has been marked as a duplicate of this bug. ***
OpenShift has moved to Jira for its defect tracking! This bug can now be found in the OCPBUGS project in Jira. https://issues.redhat.com/browse/OCPBUGS-9072