Master nodes get localhost as hostname

Symptom
The master node comes up with a hostname in the iLO console. However, the master cluster entries in the oc get nodes command do not show the hostname.
root@npsvm ~]# oc get nodes
NAME                    STATUS   ROLES    AGE   VERSION
localhost.localdomain   Ready    master   32m   v1.16.2+45a4ac4
master-01.c10.qa.com    Ready    master   32m   v1.16.2+45a4ac4
Cause

Known issue from Red Hat that occurs intermittently.

Action
  1. Terminate the nps autodeploy command by pressing N followed by Enter key.
  2. Power off all the nodes (bootstrap, master, and worker nodes).
  3. Clean up the install directory and ignition files.
    1. Clean up the /var/nps/vim/install_dir directory for the NPS toolkit VM.
    2. Clean up the /var/nps/ISO folder from the NPS toolkit VM. Ensure that the artifacts are not deleted from the /var/nps/ISO folder.
    3. For issues related to ignition files, see Failure during creation of ignition file.
  4. Download the JSON file from the database.
    1. See Rectifying an incorrect user input in the JSON file for downloading and modifying the JSON file.
    2. Modify the states of individual master nodes and bootstrap node from REGISTERED to NA and delete the entire baremetal section under state dictionary for individual master nodes and bootstrap node as shown below:
      Before deletion:
      "servers": [
                  {
                      "custom_data": {
                       ..........................
                       ..........................
                      }, 
                      "description": "xxxx", 
                      "hostname": "xxxx", 
                      "hw_profile": "xxxx", 
                      "ilo": "xxxxx", 
                      "label_password": "xxxx", 
                      "model": "DL325", 
                      "password": "xxxx", 
                      "role": "master", 
                      "serial": "xxxx", 
                      "state": {
                          "baremetal": {
                              "install": "completed"
                          }, 
                          "dhcp": "success", 
                          "hw_prep": {
                              "bios_settings": "completed", 
                              "create_user": "completed", 
                              "ilo_naming": "completed", 
                              "nic_boot_order": "completed", 
                              "nic_settings": "completed", 
                              "profile_validation": "success", 
                              "raid": "completed", 
                              "snmp": "completed"
                          }, 
                          "odim": "completed", 
                          "pxe_vlanid": "3401", 
                          "vim": "REGISTERED"
                      }, 
                      "user": "admin"
                  },
      After deletion:
      "servers": [
                  {
                      "custom_data": {
                       ..........................
                       ..........................
                      }, 
                      "description": "xxxx", 
                      "hostname": "xxxx", 
                      "hw_profile": "xxxx", 
                      "ilo": "xxxxx", 
                      "label_password": "xxxx", 
                      "model": "DL325", 
                      "password": "xxxx", 
                      "role": "master", 
                      "serial": "xxxx", 
                      "state": {
                          "dhcp": "success", 
                          "hw_prep": {
                              "bios_settings": "completed", 
                              "create_user": "completed", 
                              "ilo_naming": "completed", 
                              "nic_boot_order": "completed", 
                              "nic_settings": "completed", 
                              "profile_validation": "success", 
                              "raid": "completed", 
                              "snmp": "completed"
                          }, 
                          "odim": "completed", 
                          "pxe_vlanid": "3401", 
                          "vim": "NA"
                      }, 
                      "user": "admin"
                  },
    3. Modify the overall VIM state to NA as follows:

      Modify the state key to NA ( "state": "NA") in the vim block of the JSON as follows:

      Before modification:
      "vim": [
                  {
                     "cluster_info": {
                                      ......................................
                                      ......................................
                      "compute_plane": {
                                        ......................................
                                        ......................................
                         }, 
                                        "compute_plane": {
                                                          ......................................
                                                          ......................................
                       },
                      "control_plane": {
                                        ......................................
                                        ......................................
                       }, 
                      "persistent_volume": {
                                            ......................................
                                            ......................................
                       }, 
                      "sriov": {
                                ......................................
                                ......................................
                      }, 
                      "state": "BOOTSTRAP INSTALLED",
                      "storage_backend": [
                                          ......................................
                                          ......................................
                      ], 
                     }
              ]
      After modification to "state": "NA":
      "vim": [
          {
             "cluster_info": {
              [DO NOT DISTRUB/DELETE ANY EXISTING DATA]
              "compute_plane": {
              [DO NOT DISTRUB/DELETE ANY EXISTING DATA]
              }, 
              "compute_plane": {
              [DO NOT DISTRUB/DELETE ANY EXISTING DATA]
              },
              "control_plane": {
              [DO NOT DISTRUB/DELETE ANY EXISTING DATA]
              }, 
              "persistent_volume": {
              [DO NOT DISTRUB/DELETE ANY EXISTING DATA]
              }, 
              "sriov": {
              [DO NOT DISTRUB/DELETE ANY EXISTING DATA]
              },
              "state": "NA",
              "storage_backend": [
              [DO NOT DISTRUB/DELETE ANY EXISTING DATA]
              ], 
             }
       ]
    4. Re-upload and validate the modified JSON file. See Uploading Input JSON file for the JSON upload procedure.
    5. Ensure that the hardware preparation, ODIM RA, and CFM are up and running using the following commands:
      nps show --data odim

      The ODIM RA installation must be successful.

      nps show --data cfm

      The CFM installation must be successful.

      nps show --service switch

      The switch automation must be successful.

  5. Ensure the prerequisites mentioned in Deploying OCP using nps autodeploy are met.
  6. Rerun the nps autodeploy command, if user entered n.