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

Make e2e Helm install idempotent #2915

Merged

Conversation

CecileRobertMichon
Copy link
Contributor

@CecileRobertMichon CecileRobertMichon commented Dec 8, 2022

What type of PR is this?
/kind failing-test

What this PR does / why we need it: In order to fix CSI migration test errors (https://testgrid.k8s.io/sig-cluster-lifecycle-cluster-api-provider-azure#capi-periodic-upgrade-main-1-22-1-23) that started after #2495 merged, we need to make the Helm install idempotent for Calico and cloud provider. Also fixed the errors in the test by not installing CSI drivers before k8s 1.22 and not adding the HostProcess feature flag for windows when windows is not enabled on the template (and the right feature flags aren't in place).

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

TODOs:

  • squashed commits
  • includes documentation
  • adds unit tests

Release note:

NONE

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note-none Denotes a PR that doesn't merit a release note. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 8, 2022
@CecileRobertMichon
Copy link
Contributor Author

/test ls

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 8, 2022
@k8s-ci-robot
Copy link
Contributor

@CecileRobertMichon: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test pull-cluster-api-provider-azure-build
  • /test pull-cluster-api-provider-azure-ci-entrypoint
  • /test pull-cluster-api-provider-azure-e2e
  • /test pull-cluster-api-provider-azure-test
  • /test pull-cluster-api-provider-azure-verify

The following commands are available to trigger optional jobs:

  • /test pull-cluster-api-provider-azure-apidiff
  • /test pull-cluster-api-provider-azure-apiversion-upgrade
  • /test pull-cluster-api-provider-azure-capi-e2e
  • /test pull-cluster-api-provider-azure-conformance
  • /test pull-cluster-api-provider-azure-conformance-with-ci-artifacts
  • /test pull-cluster-api-provider-azure-e2e-csi-migration
  • /test pull-cluster-api-provider-azure-e2e-exp
  • /test pull-cluster-api-provider-azure-e2e-optional
  • /test pull-cluster-api-provider-azure-e2e-workload-upgrade
  • /test pull-cluster-api-provider-azure-windows-containerd-upstream-with-ci-artifacts
  • /test pull-cluster-api-provider-azure-windows-containerd-upstream-with-ci-artifacts-serial-slow

Use /test all to run the following jobs that were automatically triggered:

  • pull-cluster-api-provider-azure-apidiff
  • pull-cluster-api-provider-azure-build
  • pull-cluster-api-provider-azure-ci-entrypoint
  • pull-cluster-api-provider-azure-conformance
  • pull-cluster-api-provider-azure-conformance-with-ci-artifacts
  • pull-cluster-api-provider-azure-e2e
  • pull-cluster-api-provider-azure-test
  • pull-cluster-api-provider-azure-verify
  • pull-cluster-api-provider-azure-windows-containerd-upstream-with-ci-artifacts

In response to this:

/test ls

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.

@CecileRobertMichon
Copy link
Contributor Author

/test pull-cluster-api-provider-azure-e2e-csi-migration

@CecileRobertMichon
Copy link
Contributor Author

/test pull-cluster-api-provider-azure-e2e-csi-migration

1 similar comment
@CecileRobertMichon
Copy link
Contributor Author

/test pull-cluster-api-provider-azure-e2e-csi-migration

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 9, 2022
@CecileRobertMichon
Copy link
Contributor Author

/test pull-cluster-api-provider-azure-e2e-csi-migration

2 similar comments
@CecileRobertMichon
Copy link
Contributor Author

/test pull-cluster-api-provider-azure-e2e-csi-migration

@CecileRobertMichon
Copy link
Contributor Author

/test pull-cluster-api-provider-azure-e2e-csi-migration

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 9, 2022
@CecileRobertMichon
Copy link
Contributor Author

/test pull-cluster-api-provider-azure-e2e-csi-migration

1 similar comment
@CecileRobertMichon
Copy link
Contributor Author

/test pull-cluster-api-provider-azure-e2e-csi-migration

@CecileRobertMichon
Copy link
Contributor Author

/retest

@sonasingh46
Copy link
Contributor

/test pull-cluster-api-provider-azure-e2e-csi-migration

@CecileRobertMichon
Copy link
Contributor Author

/test pull-cluster-api-provider-azure-e2e-csi-migration

@jackfrancis jackfrancis added this to the v1.7 milestone Dec 15, 2022
@CecileRobertMichon CecileRobertMichon changed the title [WIP] Don't install CSI driver OOT before k8s 1.23 Don't install CSI driver OOT before k8s 1.23 Dec 15, 2022
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 15, 2022
@CecileRobertMichon CecileRobertMichon changed the title Don't install CSI driver OOT before k8s 1.23 Make e2e Helm install idempotent Dec 15, 2022
@CecileRobertMichon
Copy link
Contributor Author

All the CSI migration specific errors are gone, the last run (https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/kubernetes-sigs_cluster-api-provider-azure/2915/pull-cluster-api-provider-azure-e2e-csi-migration/1603196398872825856) fails with the upgrade CoreDNS image pull known issue (kubernetes-sigs/cluster-api#7768) which is the same error we're seeing in https://testgrid.k8s.io/sig-cluster-lifecycle-cluster-api-provider-azure#capi-periodic-upgrade-main-1-23-1-24.

I vote we merge this as an incremental improvement even if it doesn't completely fix the test and work on fixing the CoreDNS image pull issue separately (that will likely require changes in CAPI).

/assign @marosset @jackfrancis

Values: []string{"controller.replicas=1", "controller.runOnControlPlane=true"},
}
// TODO: make this always true once HostProcessContainers are on for all supported k8s versions.
if hasWindows {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we propose moving this logic into the official helm chart as well? (before injecting host process stuff into the actual resource spec you must enable the windows.useHostProcessContainers chart config and be installing onto a valid version of Kubernetes)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what the Helm chart is validating actually (as part of the daemonset) and why that option wasn't valid and failing the Helm chart install for templates that didn't enable to correct feature flag for k8s < 1.26

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh got it, thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we support anything less than 1.22 now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No and in fact I disabled this for anything < 1.23 (https://github.com/kubernetes-sigs/cluster-api-provider-azure/pull/2915/files#diff-2c7fc9c9c12632c5e550abeb31614356abd17710d948a8664f9d2f2163e38b0dR266). This is to cover the case between 1.23 and 1.26 where HostProcess containers still require the feature flag for this to work (otherwise the Helm install fails), so this makes sure we don't break e2e templates that don't have windows (and thus might not have the feature flag set, which is the case for some of the CSI migration test templates).

@jackfrancis
Copy link
Contributor

/test pull-cluster-api-provider-azure-e2e-optional

@jackfrancis
Copy link
Contributor

/lgtm

@CecileRobertMichon are these changes needed in release-1.6 and/or release-1.5 to fix broken tests therein?

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 15, 2022
@CecileRobertMichon
Copy link
Contributor Author

are these changes needed in release-1.6 and/or release-1.5 to fix broken tests therein?

no, #2495 wasn't cherry-picked (rightly so) so the regressions this is fixing were never in 1.5/1.6

@marosset
Copy link
Contributor

/lgtm

@CecileRobertMichon
Copy link
Contributor Author

/retest

known issue fixed by #2947

@CecileRobertMichon
Copy link
Contributor Author

/retest

Copy link
Contributor Author

@CecileRobertMichon CecileRobertMichon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: CecileRobertMichon

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 21, 2022
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Dec 21, 2022

@CecileRobertMichon: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cluster-api-provider-azure-e2e-csi-migration 6c23c14 link false /test pull-cluster-api-provider-azure-e2e-csi-migration
pull-cluster-api-provider-azure-e2e-optional 1b59ccb link false /test pull-cluster-api-provider-azure-e2e-optional

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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. I understand the commands that are listed here.

@CecileRobertMichon
Copy link
Contributor Author

/retest

@k8s-ci-robot k8s-ci-robot merged commit 9a6d89a into kubernetes-sigs:main Dec 21, 2022
@CecileRobertMichon
Copy link
Contributor Author

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. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants