mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #37481 from mwielgus/more-debug-ca-e2e
Automatic merge from submit-queue Add more debug information around strange failure in e2e tests To better understand problems in https://github.com/kubernetes/kubernetes/issues/33754. cc: @fgrzadkowski @piosz
This commit is contained in:
commit
cbd87c3a13
@ -210,6 +210,34 @@ var _ = framework.KubeDescribe("Cluster size autoscaling [Slow]", func() {
|
|||||||
ExpectNoError(err)
|
ExpectNoError(err)
|
||||||
newNodesSet := sets.NewString(newNodes...)
|
newNodesSet := sets.NewString(newNodes...)
|
||||||
newNodesSet.Delete(nodes...)
|
newNodesSet.Delete(nodes...)
|
||||||
|
if len(newNodesSet) > 1 {
|
||||||
|
By(fmt.Sprintf("Spotted following new nodes in %s: %v", minMig, newNodesSet))
|
||||||
|
glog.Infof("Usually only 1 new node is expected, investigating")
|
||||||
|
glog.Infof("Kubectl:%s\n", framework.RunKubectlOrDie("kubectl get nodes -o yaml"))
|
||||||
|
if output, err := exec.Command("gcloud", "compute", "instances", "list",
|
||||||
|
"--project="+framework.TestContext.CloudConfig.ProjectID,
|
||||||
|
"--zone="+framework.TestContext.CloudConfig.Zone).Output(); err != nil {
|
||||||
|
glog.Infof("Gcloud compute instances list: %s", output)
|
||||||
|
} else {
|
||||||
|
glog.Errorf("Failed to get instances list: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
for newNode := range newNodesSet {
|
||||||
|
if output, err := exec.Command("gcloud", "compute", "instances", "describe",
|
||||||
|
newNode,
|
||||||
|
"--project="+framework.TestContext.CloudConfig.ProjectID,
|
||||||
|
"--zone="+framework.TestContext.CloudConfig.Zone).Output(); err != nil {
|
||||||
|
glog.Infof("Gcloud compute instances describe: %s", output)
|
||||||
|
} else {
|
||||||
|
glog.Errorf("Failed to get instances describe: %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO: possibly remove broken node from newNodesSet to prevent removeLabel from crashing.
|
||||||
|
// However at this moment we DO WANT it to crash so that we don't check all test runs for the
|
||||||
|
// rare behavior, but only the broken ones.
|
||||||
|
}
|
||||||
|
|
||||||
defer removeLabels(newNodesSet)
|
defer removeLabels(newNodesSet)
|
||||||
By(fmt.Sprintf("Setting labels for new nodes: %v", newNodesSet.List()))
|
By(fmt.Sprintf("Setting labels for new nodes: %v", newNodesSet.List()))
|
||||||
updateNodeLabels(c, newNodesSet, labels, nil)
|
updateNodeLabels(c, newNodesSet, labels, nil)
|
||||||
|
Loading…
Reference in New Issue
Block a user