Fix host list generation

Closes: #17
Signed-off-by: Sean Eagan <seaneagan1@gmail.com>
Change-Id: Id9835ca0f6bddb35daad68fcde1abaccac45aa96
This commit is contained in:
Sean Eagan
2021-05-21 14:26:49 -05:00
parent f9226befbd
commit 4d14fac01a

View File

@@ -454,7 +454,7 @@ type bmc struct {
// generateHostList creates a list of hosts in JSON format to be mounted as a config map to the jump host pod and used
// to power cycle sub-cluster nodes.
func generateHostList(machineList bmh.MachineList) ([]byte, error) {
hosts := make([]host, len(machineList.Machines))
hosts := make([]host, 0)
for name, machine := range machineList.Machines {
managementIP, err := getManagementIP(machine.BMH.Spec.BMC.Address)
if err != nil {