Skip to content

Commit eb3b1e0

Browse files
Improve logging for MachinePool upgrade test
Signed-off-by: killianmuldoon <[email protected]>
1 parent 79c9f57 commit eb3b1e0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/framework/machinepool_helpers.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ func WaitForMachinePoolInstancesToBeUpgraded(ctx context.Context, input WaitForM
261261
}
262262

263263
if matches != len(versions) {
264-
return 0, errors.New("old version instances remain")
264+
return 0, errors.Errorf("old version instances remain. Expected %d instances at version %v. Got version list: %v", len(versions), input.KubernetesUpgradeVersion, versions)
265265
}
266266

267267
return matches, nil
@@ -294,7 +294,8 @@ func getMachinePoolInstanceVersions(ctx context.Context, input GetMachinesPoolIn
294294
return true, nil
295295
})
296296
if err != nil {
297-
versions[i] = "unknown"
297+
// Dump the instance name and error here so that we can log it as part of the version array later on.
298+
versions[i] = fmt.Sprintf("%s error: %s", instance.Name, err)
298299
} else {
299300
versions[i] = node.Status.NodeInfo.KubeletVersion
300301
}

0 commit comments

Comments
 (0)