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

Automated cherry pick of #504: Make sure the VolumeSnapshots v1 CRDs exist before starting #505: Update sample implementation #507: fix typo in CRD check #508

Conversation

mauriciopoppe
Copy link
Member

@mauriciopoppe mauriciopoppe commented Apr 30, 2021

Cherry pick of #504 #505 #507 on release-4.0.

#504: Make sure the VolumeSnapshots v1 CRDs exist before starting
#505: Update sample implementation
#507: fix typo in CRD check

For details on the cherry pick process, see the cherry pick requests page.

Does this PR introduce a user-facing change?:

Add check for v1 CRDs to allow for rolling update of the snapshot-controller

@k8s-ci-robot k8s-ci-robot added the do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. label Apr 30, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: mauriciopoppe
To complete the pull request process, please assign yuxiangqian after the PR has been reviewed.
You can assign the PR to them by writing /assign @yuxiangqian in a comment when ready.

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 k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 30, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @mauriciopoppe. Thanks for your PR.

I'm waiting for a kubernetes-csi member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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 k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. labels Apr 30, 2021
@xing-yang
Copy link
Collaborator

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Apr 30, 2021
@k8s-ci-robot
Copy link
Contributor

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

Test name Commit Details Rerun command
pull-kubernetes-csi-external-snapshotter-1-19-on-kubernetes-1-19 a2af37a link /test pull-kubernetes-csi-external-snapshotter-1-19-on-kubernetes-1-19
pull-kubernetes-csi-external-snapshotter-1-18-on-kubernetes-1-18 a2af37a link /test pull-kubernetes-csi-external-snapshotter-1-18-on-kubernetes-1-18
pull-kubernetes-csi-external-snapshotter-1-20-on-kubernetes-1-20 a2af37a link /test pull-kubernetes-csi-external-snapshotter-1-20-on-kubernetes-1-20

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.

@xing-yang
Copy link
Collaborator

I see the following errors. This is caused by the changes in the snapshot controller deployment file. Probably the new changes in StatefulSet API is not recognizable by an earlier version of K8S cluster.

Deploying snapshot-controller
   /home/prow/go/src/github.com/kubernetes-csi/external-snapshotter/deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml
        using           image: snapshot-controller:csiprow
error: error validating "STDIN": error validating data: [ValidationError(StatefulSet.spec): unknown field "minReadySeconds" in io.k8s.api.apps.v1.StatefulSetSpec, ValidationError(StatefulSet.spec): unknown field "strategy" in io.k8s.api.apps.v1.StatefulSetSpec]; if you choose to ignore these errors, turn validation off with --validate=false

@mauriciopoppe
Copy link
Member Author

I think this is failing because #459 wasn't cherrypicked to the release branch, I read this comment too #459 (comment), what do you suggest?

@xing-yang
Copy link
Collaborator

xing-yang commented Apr 30, 2021

I think this is failing because #459 wasn't cherrypicked to the release branch, I read this comment too #459 (comment), what do you suggest?

I don't think that is the problem. That PR only deploys snapshot-controller in "kube-system" namespace. The error we are getting is not "namespace not found". It is complaining about specific fields in StatefulSet Spec not existing. So there's a mismatch somewhere. It seems that the changes you added to "setup-snapshot-controller.yaml " is not compatible with what the StatefulSet Spec is expecting on this cluster.

@xing-yang
Copy link
Collaborator

xing-yang commented Apr 30, 2021

I know what the problem is now. In release-4.0, we are using "statefulset" to deploy snapshot-controller. In master, we are using "deployment". So the new fields you added to "setup-snapshot-controller.yaml " are not valid fields on release-4.0 branch.

I'm not sure that we can backport a change that needs to change from "statefulset" to "deployment". I think for this type of change, we need to bump the minor version, i.e., from 4.0.0 to 4.1.0. We are about to release 4.1.0. So maybe we don't need to backport to release-4.0.

@mauriciopoppe
Copy link
Member Author

mauriciopoppe commented Apr 30, 2021

if we can't backport #459 then I can probably just cherrypick the changes on the startup code and not the manifests, what do you think?

Also the idea of releasing 4.1.0 would be great!

cc @msau42

@xing-yang
Copy link
Collaborator

Hi @mauriciopoppe, v4.1.0 is just released.

Looks like StatefulSet also has an UpdateStrategy field. Do you want to take a look and see if similar changes can be applied?
https://github.com/kubernetes/kubernetes/blob/v1.22.0-alpha.1/pkg/apis/apps/types.go#L153

@mauriciopoppe
Copy link
Member Author

Thanks for the suggestion @xing-yang, I've looked at this field and it has this shape:

updateStrategy:
  type: "RollingUpdate" | "OnDelete"
  rollingUpdate:
    partition: int32

Unfortunately for the fix in #504 to work we rely on minReadySeconds, however because there's a new release I'm going to use that instead.

@mauriciopoppe mauriciopoppe deleted the automated-cherry-pick-of-#504-#505-#507-upstream-release-4.0 branch May 4, 2021 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants