-
Notifications
You must be signed in to change notification settings - Fork 370
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
Get error when creating volume snapshot #300
Comments
I see the following error message in your logs. It looks like you have not created the secret but you have that secret referenced in the snapshot class.
|
@xing-yang I used a wrong secret at first but then fixed to use the right one. |
@xing-yang I forget to mention that I am in team which develop CSI driver and I am adding snapshots support. Any idea what could be wrong? Its really blocking us prom proceeding. Thank you! |
@igorgonibm what image versions of snapshot-controller and csi-snapshotter sidecar are you using? Can you provide "kubectl describe volumesnapshot"? Those error messages you posted are failures updating objects in the API server but the retries were successful later as VolumeSnapshotContent has its status updated and ReadyToUse is set true. I don't know what is the status of VolumeSnapshot. Can you set log level to 5 and reproduce the logs? I can't find any messages on updating the VoumeSnapshot status in the existing logs. |
I created new snapshot and attached relevant yamls. describe of class, snapshot and snapshotcomntent and snapshotter log |
According to "kubectl describe volumesnapshot", the snapshot is created successfully.
|
@xing-yang so why is there error message in the log? It is related to the current snap content. E0422 14:08:03.234487 1 snapshot_controller_base.go:250] could not sync content "snapcontent-b52df980-4158-4af1-b0ad-bffa7d1a2937": failed to remove VolumeSnapshotBeingCreated annotation from the content snapcontent-b52df980-4158-4af1-b0ad-bffa7d1a2937: "snapshot controller failed to update snapcontent-b52df980-4158-4af1-b0ad-bffa7d1a2937 on API server: Operation cannot be fulfilled on volumesnapshotcontents.snapshot.storage.k8s.io "snapcontent-b52df980-4158-4af1-b0ad-bffa7d1a2937": the object has been modified; please apply your changes to the latest version and try again" |
This is because VolumeSnapshotBeingCreated annotation was already removed earlier. This syncContent call has an older version of the object so it failed to remove it again, but it is actually already removed. I'll take a look to see how to avoid this error. |
/assign @xing-yang |
Thank you. Will wait for your answer. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
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. |
Hi @xing-yang, I am facing similar issue , was this issue fixed.
|
@bhargavkeshav were you able to fix the issue? |
this seems to be related issue kubernetes-sigs/controller-runtime#1881 |
I can see the same issue as well on GKE v1.25.8-gke.1000
Error
|
Hi @xing-yang I am facing similar issue , was this issue fixed ? |
There's a WIP PR that may fix this problem: #876 |
ok |
When creating snapshot I get the following messages in csi-snapshotter logs:
Full log, snap content describe and relevant yamls attached
I0421 09:23:09.254741 1 snapshot_controller.go:606] setAnnVolumeSnapshotBeingCreated: set annotation [snapshot.storage.kubernetes.io/volumesnapshot-being-created:yes] on content [snapcontent-3f3c2bc8-2305-4b26-95f6-0e641e8e3762].
I0421 09:23:09.259302 1 snapshot_controller.go:179] updateContentStatusWithEvent[snapcontent-3f3c2bc8-2305-4b26-95f6-0e641e8e3762]
I0421 09:23:09.263085 1 snapshot_controller.go:200] updating VolumeSnapshotContent[snapcontent-3f3c2bc8-2305-4b26-95f6-0e641e8e3762] error status failed Operation cannot be fulfilled on volumesnapshotcontents.snapshot.storage.k8s.io "snapcontent-3f3c2bc8-2305-4b26-95f6-0e641e8e3762": the object has been modified; please apply your changes to the latest version and try again
E0421 09:23:09.263110 1 snapshot_controller.go:139] createSnapshot [create-snapcontent-3f3c2bc8-2305-4b26-95f6-0e641e8e3762]: error occurred in createSnapshotWrapper: failed to add VolumeSnapshotBeingCreated annotation on the content snapcontent-3f3c2bc8-2305-4b26-95f6-0e641e8e3762: "snapshot controller failed to update snapcontent-3f3c2bc8-2305-4b26-95f6-0e641e8e3762 on API server: Operation cannot be fulfilled on volumesnapshotcontents.snapshot.storage.k8s.io "snapcontent-3f3c2bc8-2305-4b26-95f6-0e641e8e3762": the object has been modified; please apply your changes to the latest version and try again"
E0421 09:23:09.263208 1 goroutinemap.go:150] Operation for "create-snapcontent-3f3c2bc8-2305-4b26-95f6-0e641e8e3762" failed. No retries permitted until 2020-04-21 09:23:09.763165038 +0000 UTC m=+6.819361135 (durationBeforeRetry 500ms). Error: "failed to add VolumeSnapshotBeingCreated annotation on the content snapcontent-3f3c2bc8-2305-4b26-95f6-0e641e8e3762: "snapshot controller failed to update snapcontent-3f3c2bc8-2305-4b26-95f6-0e641e8e3762 on API server: Operation cannot be fulfilled on volumesnapshotcontents.snapshot.storage.k8s.io \"snapcontent-3f3c2bc8-2305-4b26-95f6-0e641e8e3762\": the object has been modified; please apply your changes to the latest version and try again""
yamls_and_log.zip
The text was updated successfully, but these errors were encountered: