Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run e2e tests without specifying an image config file #80

Merged

Conversation

upodroid
Copy link
Member

@upodroid upodroid commented Jul 17, 2023

This change is designed to work with kubetest2 changes.

Right now, an image config file that looks like this is required:

images:
  al2023-6-1:
    ssm_path: /aws/service/ami-amazon-linux-latest/al2023-ami-kernel-6.1-arm64
    instance_type: m6g.large
    user_data_file: al2023-6.1.yaml
  ubuntu-2204:
    ssm_path: /aws/service/canonical/ubuntu/server/jammy/stable/current/arm64/hvm/ebs-gp2/ami-id
    instance_type: m6g.large
    user_data_file: ubuntu2204.yaml

This is quite burdensome and I'm proposing the following changes:

Pass everything required as flags to kubetest2 so the generator I'm writing can work easily. kops configures all their various mutations by various flags being passed to kubetest2.

For example, to run ubuntu2204 tests, all I would do is pass two different for values for the instance-type and images arguments and use a common user-data-file

ubuntu@dev:~/go/src/k8s.io/kubernetes$ kubetest2 noop --test node -- --provider=aws --images=ami-03a4363a7d864a093 --instance-type=e2-standard-2 --repo-root=../../sigs.k8s.io/provider-aws-test-infra/ --user-data-file=../../sigs.k8s.io/provider-aws-test-infra/config/ubuntu2204.yaml
I0717 20:14:22.586716  111665 app.go:61] The files in RunDir shall not be part of Artifacts
I0717 20:14:22.586972  111665 app.go:62] pass rundir-in-artifacts flag True for RunDir to be part of Artifacts
I0717 20:14:22.587027  111665 app.go:64] RunDir for this run: "/home/ubuntu/go/src/k8s.io/kubernetes/_rundir/bfbe852b-e08a-4f0e-844c-bea40a2eabe8"
I0717 20:14:22.588245  111665 app.go:130] ID for this run: "bfbe852b-e08a-4f0e-844c-bea40a2eabe8"
Test artifacts will be written to /home/ubuntu/go/src/k8s.io/kubernetes/_artifacts
Running tests remotely using
Account: 855606814420
Region: us-east-1
Images: ami-03a4363a7d864a093
SSH User: ubuntu
Ginkgo Flags: -timeout=24h -nodes=8  -skip="\[Flaky\]|\[Slow\]|\[Serial\]"
Instance Type: e2-standard-2
Kubelet Config File: test/e2e_node/jenkins/default-kubelet-config.yaml
Kubernetes directory: /home/ubuntu/go/src/k8s.io/kubernetes
Will use ginkgo flags as: -timeout=24h -nodes=8  -skip="\[Flaky\]|\[Slow\]|\[Serial\]"  --no-color -vI0717 20:14:29.272600  111768 remote.go:72] Building archive...
I0717 20:14:29.273069  111768 build.go:45] Building k8s binaries...
go version go1.20.6 linux/amd64
+++ [0717 20:14:29] Setting GOMAXPROCS: 4
+++ [0717 20:14:29] Building go targets for linux/amd64
    k8s.io/kubernetes/cmd/kubelet (non-static)
    k8s.io/kubernetes/test/e2e_node/e2e_node.test (test)
    github.com/onsi/ginkgo/v2/ginkgo (non-static)
    k8s.io/kubernetes/cluster/gce/gci/mounter (non-static)
    k8s.io/kubernetes/test/e2e_node/plugins/gcp-credential-provider (non-static)
I0717 20:14:48.577169  111768 node_e2e.go:65] Copying binaries from /home/ubuntu/go/src/k8s.io/kubernetes/_output/local/go/bin/kubelet
I0717 20:14:48.672399  111768 node_e2e.go:65] Copying binaries from /home/ubuntu/go/src/k8s.io/kubernetes/_output/local/go/bin/e2e_node.test
I0717 20:14:48.800498  111768 node_e2e.go:65] Copying binaries from /home/ubuntu/go/src/k8s.io/kubernetes/_output/local/go/bin/ginkgo
I0717 20:14:48.810820  111768 node_e2e.go:65] Copying binaries from /home/ubuntu/go/src/k8s.io/kubernetes/_output/local/go/bin/mounter
I0717 20:14:48.814150  111768 node_e2e.go:65] Copying binaries from /home/ubuntu/go/src/k8s.io/kubernetes/_output/local/go/bin/gcp-credential-provider
Initializing e2e tests using image  / ami-03a4363a7d864a093.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>                              START TEST                                >
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Start Test Suite on Host

Failure Finished Test Suite on Host . Refer to artifacts directory for ginkgo log for this host.
unable to create EC2 instance for image ami-03a4363a7d864a093, creating instance, InvalidParameterValue: Invalid value 'e2-standard-2' for InstanceType.
	status code: 400, request id: 4fc21d51-a51b-4557-b0d4-7d662aff80cb
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<                              FINISH TEST                               <
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Failure: 1 errors encountered.
exit status 1
>> go run exited with 1 at Mon Jul 17 20:15:03 UTC 2023

test-e2e-node.sh: FAIL
make: *** [Makefile:93: test-e2e-node] Error 1
F0717 20:15:03.743609  111677 node.go:282] failed to run ginkgo tester: exit status 2
Error: exit status 255

/cc @dims

@k8s-ci-robot k8s-ci-robot requested a review from dims July 17, 2023 20:30
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 17, 2023
@upodroid
Copy link
Member Author

We should explicitly set IMAGE_CONFIG_FILE on the jobs and eliminate IMAGE_CONFIG_DIR.

Thoughts?

@upodroid
Copy link
Member Author

/retest

@upodroid
Copy link
Member Author

/test pull-kubernetes-node-arm64-e2e-containerd-ec2-canary

@upodroid
Copy link
Member Author

/retest

@upodroid
Copy link
Member Author

/cc @dims

@dims
Copy link
Member

dims commented Jul 27, 2023

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added lgtm "Looks good to me", indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 27, 2023
@upodroid
Copy link
Member Author

/retest

1 similar comment
@upodroid
Copy link
Member Author

/retest

@dims
Copy link
Member

dims commented Jul 27, 2023

/approve
/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, upodroid

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 4b11582 into kubernetes-sigs:main Jul 27, 2023
@upodroid
Copy link
Member Author

The serial tests are too flaky

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants