Skip to content

Commit b3d7640

Browse files
authored
Merge pull request #8728 from killianmuldoon/pr-improve-mp-upgrade-logging
🌱 Improve logging for MachinePool upgrade test
2 parents b7e92f8 + eb3b1e0 commit b3d7640

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)