Document URL: https://docs.openshift.com/container-platform/4.10/installing/installing_bare_metal_ipi/ipi-install-expanding-the-cluster.html Section Number and Name: https://docs.openshift.com/container-platform/4.10/installing/installing_bare_metal_ipi/ipi-install-expanding-the-cluster.html Describe the issue: In the "Preparing the bare metal node" section of the above documentation there is Baremetalhost definition file that includes the section "networkConfig". ~~~ apiVersion: metal3.io/v1alpha1 kind: BareMetalHost metadata: name: openshift-worker-<num> spec: online: true bootMACAddress: <NIC1-mac-address> bmc: address: <protocol>://<bmc-ip> credentialsName: openshift-worker-<num>-bmc-secret networkConfig: <------------------ interfaces: - name: <NIC1_name> type: ethernet state: up ipv4: address: - ip: "<IP_address>" prefix-length: 24 enabled: true dns-resolver: config: server: - <DNS_IP_address> routes: config: - destination: 0.0.0.0/0 next-hop-address: <IP_address> next-hop-interface: <NIC1_name> ~~~ This is not valid as it is not included in the API reference documentation page: https://docs.openshift.com/container-platform/4.10/rest_api/provisioning_apis/baremetalhost-metal3-io-v1alpha1.html Or at the latest version oc client: ~~~ [nstamate@nstamate ~]$ oc version Client Version: 4.10.12 Server Version: 4.10.8 Kubernetes Version: v1.23.5+1f952b3 [nstamate@nstamate ~]$ oc explain baremetalhost.spec KIND: BareMetalHost VERSION: metal3.io/v1alpha1 RESOURCE: spec <Object> DESCRIPTION: BareMetalHostSpec defines the desired state of BareMetalHost FIELDS: ------------------ trimmed output ----------------------------------- metaData <Object> MetaData holds the reference to the Secret containing host metadata (e.g. meta_data.json) which is passed to the Config Drive. networkData <Object> NetworkData holds the reference to the Secret containing network configuration (e.g content of network_data.json) which is passed to the Config Drive. online <boolean> -required- Should the server be online? ------------------ trimmed output ----------------------------------- The only way to configure the bare metal node's networking during provisioning is using the "networkData" object or using "networkConfig" during installation fo the cluster AFAIK or correct me if I'm wrong. Suggestions for improvement: This section should be removed/corrected as it is misleading customers. Additional information: This was found during the investigation of the attached case.
Hello again, After internal communication I should add in this bug that the networkData is not the correct way to do this either. The administrator should add the spec.preprovisioningNetworkDataName object and reference a secret that includes the network configuration in nmstate format like below: ~~~ apiVersion: v1 kind: Secret metadata: name: new-worker-network-config type: Opaque stringData: nmstate: | 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 state: up ipv4: address: - ip: 192.168.123.11 prefix-length: 24 enabled: true dhcp: false --- apiVersion: v1 kind: Secret metadata: name: openshift-worker-bmc-secret namespace: openshift-machine-api type: Opaque data: username: <base64-formated-username> password: <base64-formated-password> --- apiVersion: metal3.io/v1alpha1 kind: BareMetalHost metadata: name: new-openshift-worker namespace: openshift-machine-api spec: online: true bootMACAddress: <MAC-address> rootDeviceHints: deviceName: "/dev/sda" bmc: address: <bmc_address> credentialsName: openshift-worker-bmc-secret preprovisioningNetworkDataName: new-worker-network-config ~~~ All this information is included in this KCS article i have created https://access.redhat.com/solutions/6957587 until the documentation is fixed. Regarding the networkData object im still not sure what is the difference and in what cases it must be used instead. So if you have any insight on this please share. Thank you.
Also note preprovisioningNetworkDataName is optional - in the default DHCP case no configuraiton is needed, which is not clear in the current docs where the BMH contains the (incorrect) networkConfig field
Moving this back to 'assigned' since the PR hasn't been merged yet.
Moving this back to ON_QA since the fix is implemented in the docs PR and it can't be merged without QE ack/approval/lgtm
Moving this to POST after discussing it with @awolff
Moving this to ON_QA based on the OpenShift Doc guidelines (https://github.com/openshift/openshift-docs/blob/main/contributing_to_docs/doc_guidelines.adoc#verification-of-your-content)
Procedure tested successfully on 4.10