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

Add event for snapshotting in progress #268

Closed
msau42 opened this issue Mar 5, 2020 · 10 comments · Fixed by #289
Closed

Add event for snapshotting in progress #268

msau42 opened this issue Mar 5, 2020 · 10 comments · Fixed by #289
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@msau42
Copy link
Collaborator

msau42 commented Mar 5, 2020

We have a similar event when creating a PVC that we're waiting for the driver to provision.

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Mar 5, 2020
@xing-yang
Copy link
Collaborator

@msau42 you want this event to be on VolumeSnapshot object, not VolumeSnapshotContent, right?

@msau42
Copy link
Collaborator Author

msau42 commented Mar 5, 2020

Correct

@xing-yang
Copy link
Collaborator

If we are adding this on VolumeSnapshot object, we can do it after we've created VolumeSnapshotContent in the common controller. It is not very precise but probably close enough.

The sidecar is the one that sends request to the CSI driver but it only has access to the VolumeSnapshotContent object.

We can also have the common controller check the VolumeSnapshotBeingCreated annotation (which is being added in this PR: #261) and add event when the annotation is added. That will have a delay.

@xing-yang
Copy link
Collaborator

Discussed about this at today's CSI implementation meeting and had a conclusion:
We'll add an event on the VolumeSnapshot API object after we've created VolumeSnapshotContent in the common controller.

Take a look of the create event on PVC for example.

@xing-yang
Copy link
Collaborator

/assign @zhucan

@zhucan
Copy link
Member

zhucan commented Mar 16, 2020

@xing-yang Can you show me the example for creating event on PVC?

@xing-yang
Copy link
Collaborator

We need to make a call like this:
https://github.com/kubernetes-csi/external-snapshotter/blob/master/pkg/common-controller/snapshot_controller.go#L661

The event will be added on VolumeSnapshot object and eventype should be v1.EventTypeNormal. Take a look of the caller of updateSnapshotErrorStatusWithEvent() to see how the parameters are passed in. We don't need to call updateSnapshotErrorStatusWithEvent() here because we only need to create a normal event on VolumeSnapshot object, no need to update status.

@xing-yang
Copy link
Collaborator

@zhucan
Copy link
Member

zhucan commented Mar 26, 2020

@xing-yang we only need to add the event after the volumesnapshotcontent be created?

@xing-yang
Copy link
Collaborator

@xing-yang we only need to add the event after the volumesnapshotcontent be created?

Yes.

rhrmo added a commit to rhrmo/external-snapshotter that referenced this issue Dec 17, 2024
04965932 Merge pull request kubernetes-csi#268 from huww98/cloudbuild
119aee1f Merge pull request kubernetes-csi#266 from jsafrane/bump-sanity-5.3.1
0ae5e52d Update cloudbuild image with go 1.21+
406a79ac Merge pull request kubernetes-csi#267 from huww98/gomodcache
9cec273d Set GOMODCACHE to avoid re-download toolchain
98f23071 Merge pull request kubernetes-csi#260 from TerryHowe/update-csi-driver-version
e9d8712d Merge pull request kubernetes-csi#259 from stmcginnis/deprecated-kind-kube-root
faf79ff6 Remove --kube-root deprecated kind argument
734c2b95 Merge pull request kubernetes-csi#265 from Rakshith-R/consider-main-branch
43bde065 Bump csi-sanity to 5.3.1
f95c855b Merge pull request kubernetes-csi#262 from huww98/golang-toolchain
3c8d966f Treat main branch as equivalent to master branch
6b05f0fc use new GOTOOLCHAIN env to manage go version
18b6ac6d chore: update CSI driver version to 1.15

git-subtree-dir: release-tools
git-subtree-split: 04965932661b6e62709dcdbb9c25da528bac2605
AndrewSirenko added a commit to AndrewSirenko/external-snapshotter that referenced this issue Dec 17, 2024
049659326 Merge pull request kubernetes-csi#268 from huww98/cloudbuild
119aee1ff Merge pull request kubernetes-csi#266 from jsafrane/bump-sanity-5.3.1
0ae5e52d9 Update cloudbuild image with go 1.21+
43bde065f Bump csi-sanity to 5.3.1

git-subtree-dir: release-tools
git-subtree-split: 04965932661b6e62709dcdbb9c25da528bac2605
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants