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

Create snapshotclass based on snapshotter sidecar version #126

Conversation

ggriffiths
Copy link
Member

Signed-off-by: Grant Griffiths grant@portworx.com

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

What this PR does / why we need it:
We were deploying the latest snapshotclass for on-kubernetes-master tests, regardless of the csi-snapshotter version. Now we'll apply the snapshotclass depending on the sidecar version.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added 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 6, 2019
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 6, 2019
@ggriffiths
Copy link
Member Author

/test pull-kubernetes-csi-csi-driver-host-path-1-17-on-kubernetes-master

@ggriffiths
Copy link
Member Author

/test pull-kubernetes-csi-csi-driver-host-path-1-15-on-kubernetes-master

@ggriffiths
Copy link
Member Author

/assign @msau42

kubectl apply -f $SNAPSHOTCLASS_PATH
echo "deploying snapshotclass based on snapshotter version"
snapshotter_version="$(rbac_version "${BASE_DIR}/hostpath/csi-hostpath-snapshotter.yaml" csi-snapshotter false)"
kubectl apply -f "https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${snapshotter_version}/examples/kubernetes/snapshotclass.yaml"
Copy link
Collaborator

Choose a reason for hiding this comment

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

this is sort of strange because the snapshotclass should live with the driver like storageclass does.

Another option I was thinking is to disable snapshots when the deployment version doesn't match the kubernetes version (before 1.17). Because it was an alpha feature so there's no guarantees for cross version compatibility.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm ok, I'm unfamiliar with how to skip the snapshot tests. If we just don't apply a snapshotclass, will that cause the tests to be skipped?

Copy link
Collaborator

Choose a reason for hiding this comment

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

while it was alpha, we only run the snapshot tests when the cluster and deployment version matched, and also only for the latest version. So I think for logic < 1.17, we can make this assumption.

@ggriffiths ggriffiths force-pushed the snapshotclass_fix_snapshotter_version branch from 7bb4d65 to 2bcd316 Compare December 10, 2019 21:36
@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 10, 2019
@ggriffiths ggriffiths force-pushed the snapshotclass_fix_snapshotter_version branch from 2bcd316 to 776a090 Compare December 10, 2019 21:41
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Dec 10, 2019
@ggriffiths ggriffiths closed this Dec 10, 2019
@ggriffiths ggriffiths reopened this Dec 10, 2019
@ggriffiths
Copy link
Member Author

ggriffiths commented Dec 10, 2019

1.17 test flaked I believe:

    should support restarting containers using directory as subpath [Slow] [It]
    /home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/test/e2e/storage/testsuites/subpath.go:315
    Dec 10 21:59:02.741: while waiting for container to stabilize
      
    Unexpected error:
        <*errors.errorString | 0xc0000d9890>: {
            s: "timed out waiting for the condition",
        }
        timed out waiting for the condition
    occurred

/test pull-kubernetes-csi-csi-driver-host-path-1-17-on-kubernetes-1-17

@ggriffiths ggriffiths force-pushed the snapshotclass_fix_snapshotter_version branch from 776a090 to d1dac1a Compare December 10, 2019 22:44
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 10, 2019
Signed-off-by: Grant Griffiths <grant@portworx.com>
@ggriffiths ggriffiths force-pushed the snapshotclass_fix_snapshotter_version branch from d1dac1a to f946d8c Compare December 10, 2019 22:45
@msau42
Copy link
Collaborator

msau42 commented Dec 10, 2019

/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 Dec 10, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ggriffiths, msau42

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 10, 2019
@k8s-ci-robot k8s-ci-robot merged commit 1aadf37 into kubernetes-csi:master Dec 10, 2019
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/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