test-infra icon indicating copy to clipboard operation
test-infra copied to clipboard

Enable in-tree gcepd driver for e2e tests

Open mattcary opened this issue 3 years ago • 16 comments

See https://github.com/kubernetes/kubernetes/pull/109541. Since cloud-provider-gcp installs the pd csi driver, it's safe to enable this now.

Tested manually, the best I could and it seemed to pass.

/assign @leiyiz

mattcary avatar Jul 21 '22 23:07 mattcary

/lgtm /approve

leiyiz avatar Jul 21 '22 23:07 leiyiz

Probably you want to add this to a much broader set of tests - presubmit and another periodic. In this case you probably should use preset. However, I have a strong feeling that this is a no-op change.

https://github.com/kubernetes-sigs/kubetest2/blob/master/kubetest2-gce/deployer/common.go#L89 does not pass environment variables as it's unsupported in kubetest2.

See #26760

jprzychodzen avatar Jul 22 '22 07:07 jprzychodzen

/hold

jprzychodzen avatar Jul 22 '22 07:07 jprzychodzen

@jprzychodzen note these are tests that up until the beginning of the year ran with this e2e tests, and were disabled due to csi migration. So I'm not sure another periodic is necessary?

At any rate, the thing about environment variables and kubetest2 is annoying. I don't fully understand it, but I'll take your word for it. As you can see from https://github.com/kubernetes/kubernetes/pull/109541 the test setup depends on environment variables being passed in.

Maybe we should fix kubetest2? Or change e2e.test to detect if the pd csi driver is installed.

mattcary avatar Jul 22 '22 17:07 mattcary

Ah, I see now - I was thinking that is passed to kubetest2 deployer part - gce deployer. This part does not support env variables. I don't know about ginko framework part. It might already support env variables so this change would do what you want.

In this case - could you create a preset with this env, add this preset to all e2e tests - there is presubmit that should have this env variable.

Regarding changing kubetest2 gce deployer - it seems like some kind of explicit decision from the comment, so I guess it would be to understand why it's this way before changing the code.

jprzychodzen avatar Jul 25 '22 07:07 jprzychodzen

Hmm, looking at some internal GKE tests, it appears that indeed the env variable doesn't get plumbed through (we stop testing gcepd at 1.24 which is where https://github.com/kubernetes/kubernetes/pull/109541 was backported to IIRC.

So I think we do need a command line flag or a test config change?

mattcary avatar Jul 27 '22 23:07 mattcary

I've raised https://github.com/kubernetes-sigs/kubetest2/issues/202 to start discussion and will work on adding a flag in the meantime.

mattcary avatar Jul 27 '22 23:07 mattcary

New changes are detected. LGTM label has been removed.

k8s-ci-robot avatar Jul 29 '22 16:07 k8s-ci-robot

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: leiyiz, mattcary Once this PR has been reviewed and has the lgtm label, please ask for approval from mikedanese by writing /assign @mikedanese in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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 avatar Jul 29 '22 16:07 k8s-ci-robot

I've updated this PR for the new flag, but it will need to be backported to 1.24 before it will be usable from the prow job (and wait for a patch release to come out? the prow job uses test version 1.24.2 explicitly, so we'll have to update the patch release as well I think)

mattcary avatar Jul 29 '22 16:07 mattcary

Sorry for the long time to respond, pre freeze time was intensive.

Probably the most reasonable approach forward with this flag is to migrate tests (and repository) to 1.25/master branch, which should happen ~soon, as a part of preparation to 1.25 release.

jprzychodzen avatar Aug 03 '22 12:08 jprzychodzen

Makes sense. Are you planning on continuing to pin to a patch release, track release-1.25, or just track master?

mattcary avatar Aug 03 '22 15:08 mattcary

Short term - pin it to 1.25.

Medium/long term - I need to rework repository bumping/tracking, and this will be part of the problem to solve.

jprzychodzen avatar Aug 03 '22 16:08 jprzychodzen

sg, thx

mattcary avatar Aug 03 '22 16:08 mattcary

@mattcary: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Sep 01 '22 17:09 k8s-ci-robot

/cc

spiffxp avatar Oct 07 '22 22:10 spiffxp

@mattcary can we close this PR?

Right now test jobs are using ginko version based on cloud-provider-gcp file (which now points to 1.25.3).

jprzychodzen avatar Nov 02 '22 15:11 jprzychodzen

If we're now pinned to 1.25, I think we can submit this (when it was on 1.24, the flag would be ignored IIRC).

Let me rebase and test it again.

mattcary avatar Nov 02 '22 16:11 mattcary

In this case please first add this flag in a fork of current presubmit to prevent breaking presubmit (see #27618 and #27823 for a process)

jprzychodzen avatar Nov 02 '22 16:11 jprzychodzen

The recent push has forked out the jobs as you requested.

Although, I'm not able to test the kubetest2 commands any longer. I can add a --gcp-project flag to avoid boskos, but it fails trying to make release-tars (there's no release-tars rule). Maybe I have a bad combination of kubetest2 and k8s versions? I've tried kubetest2 at head and k8s at head and release-1.25, but no luck.

Anyway I guess since I've forked the presubmits it will probably be faster to submit this and let them run, than figure out kubetest :-/

mattcary avatar Nov 02 '22 17:11 mattcary

Thanks!

/lgtm /approve

jprzychodzen avatar Nov 03 '22 04:11 jprzychodzen

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jprzychodzen, leiyiz, mattcary

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 avatar Nov 03 '22 04:11 k8s-ci-robot

/remove hold

mattcary avatar Nov 03 '22 16:11 mattcary

/unhold

jprzychodzen avatar Nov 04 '22 12:11 jprzychodzen

@mattcary: Updated the job-config configmap in namespace default at cluster test-infra-trusted using the following files:

  • key cloud-provider-gcp-periodics.yaml using file config/jobs/kubernetes/cloud-provider-gcp/cloud-provider-gcp-periodics.yaml

In response to this:

See https://github.com/kubernetes/kubernetes/pull/109541. Since cloud-provider-gcp installs the pd csi driver, it's safe to enable this now.

Tested manually, the best I could and it seemed to pass.

/assign @leiyiz

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Nov 04 '22 13:11 k8s-ci-robot