CAPI pivot test always case failing in e2es #5252
Labels
kind/failing-test
Categorizes issue or PR as related to a consistently or frequently failing test.
priority/critical-urgent
Highest priority. Must be actively worked on as someone's top priority right now.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
/kind failing-test
What steps did you take and what happened:
Both pull request jobs and periodic jobs are regularly failing on the
capa-e2e.[It] [unmanaged] [Cluster API Framework] Self Hosted Spec Should pivot the bootstrap cluster to a self-hosted cluster
test case.A sample periodic job: https://prow.k8s.io/view/gs/kubernetes-ci-logs/logs/periodic-cluster-api-provider-aws-e2e/1866955108403646464
A sample pull request job: https://prow.k8s.io/view/gs/kubernetes-ci-logs/pr-logs/pull/kubernetes-sigs_cluster-api-provider-aws/5250/pull-cluster-api-provider-aws-e2e/1867146874104844288
What did you expect to happen:
Test case would pass more often
Anything else you would like to add:
Having dug into this a few times (see PRs #5249 and #5251), I've come to the conclusion that, for some reason, the container image for the CAPA manager that's built during the test run isn't present on the Kubeadm control plane node during a clusterctl move.
The below samples are pulling information from the periodic job at https://prow.k8s.io/view/gs/kubernetes-ci-logs/logs/periodic-cluster-api-provider-aws-e2e/1866955108403646464
build log output
clusterctl move output
From https://storage.googleapis.com/kubernetes-ci-logs/logs/periodic-cluster-api-provider-aws-e2e/1866955108403646464/artifacts/clusters/self-hosted-lv1y15/logs/self-hosted-rjpecj/clusterctl-move.log
Since this failing to reach webhooks, I looked at the CAPA control plane.
capa-manager Pod
This is the most obvious problem; the container image isn't found, sending the pod into
CrashLoopBackOff
.https://storage.googleapis.com/kubernetes-ci-logs/logs/periodic-cluster-api-provider-aws-e2e/1866955108403646464/artifacts/clusters/self-hosted-lv1y15/resources/capa-system/Pod/capa-controller-manager-7f5964cb58-wmvb5.yaml
Associated Node
The node associated with the pod does not list the
gcr.io/k8s-staging-cluster-api/capa-manager:e2e
image as being present.From https://storage.googleapis.com/kubernetes-ci-logs/logs/periodic-cluster-api-provider-aws-e2e/1866955108403646464/artifacts/clusters/self-hosted-lv1y15/resources/Node/ip-10-0-136-158.us-west-2.compute.internal.yaml
KubeadmConfig
The KubeadmConfig shows that the containerd runtime should be copying a container image from ECR before joining the cluster.
https://storage.googleapis.com/kubernetes-ci-logs/logs/periodic-cluster-api-provider-aws-e2e/1866955108403646464/artifacts/clusters/self-hosted-lv1y15/resources/self-hosted-rjpecj/KubeadmConfig/self-hosted-lv1y15-control-plane-qhfvf.yaml
The KubeadmControlPlane has the same entry.
Creating the test image
Based on our end-to-end test definitions, the image is successfully created and uploaded to ECR. All other tests seem to be able to find it.
The
ensureTestImageUploaded
function is what logs in to ECR and uploads the image so that the nodes may then download it. https://github.com/kubernetes-sigs/cluster-api-provider-aws/blob/main/test/e2e/shared/aws.go#L676The ginkgo suites require this function to pass.
cluster-api-provider-aws/test/e2e/shared/suite.go
Line 159 in 3a646b3
Environment:
main
kubectl version
):/etc/os-release
): Ubuntu on Kube CIThe text was updated successfully, but these errors were encountered: