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

deploy: fix CSIStorageCapacity version check #262

Conversation

pohly
Copy link
Contributor

@pohly pohly commented Mar 24, 2021

What type of PR is this?
/kind bug

What this PR does / why we need it:

Checking via "kubectl get" and parsing its output was broken in
combination with "-o pipefail" because then the overall result of the
pipe was false even when the expected error occurred. Checking the
output of "kubectl api-resources" and failing the install when that
command fails (i.e. not using it inside an if) is better.

The check also failed on clusters that had the v1beta1 API but not the
v1alpha1. We need to be very careful about which version we need for
the external-provisioner that is going to be installed. Unfortunately
some heuristics are needed to determine that.

Does this PR introduce a user-facing change?:

Deploying `kubernetes-distributed` did not always correctly detect whether the right CSIStorageCapacity API was supported. Incorrectly enabling the feature then prevented scheduling of pods with late binding volumes.

Checking via "kubectl get" and parsing its output was broken in
combination with "-o pipefail" because then the overall result of the
pipe was false even when the expected error occurred. Checking the
output of "kubectl api-resources" and failing the install when that
command fails (i.e. not using it inside an if) is better.

The check also failed on clusters that had the v1beta1 API but not the
v1alpha1. We need to be very careful about which version we need for
the external-provisioner that is going to be installed. Unfortunately
some heuristics are needed to determine that.
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. labels Mar 24, 2021
@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 Mar 24, 2021
@pohly
Copy link
Contributor Author

pohly commented Mar 24, 2021

/test pull-kubernetes-csi-csi-driver-host-path-distributed-on-kubernetes-master

@k8s-ci-robot
Copy link
Contributor

@pohly: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-kubernetes-csi-csi-driver-host-path-distributed-on-kubernetes-master 89e339b link /test pull-kubernetes-csi-csi-driver-host-path-distributed-on-kubernetes-master

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.

@pohly
Copy link
Contributor Author

pohly commented Mar 24, 2021

Both kubernetes-csi/csi-release-tools#139 and changing the Prow job config will fix the test failure on master. I prefer the csi-release-tools update.

In the meantime, let's merge this because it should fix periodic testing on master which already has Bazel usage suppressed.

@jsafrane
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 24, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jsafrane, pohly

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 Mar 24, 2021
@k8s-ci-robot k8s-ci-robot merged commit 35c63f9 into kubernetes-csi:master Mar 24, 2021
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/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. 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