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

The PV migrated from storage provisioner kubernetes.io/aws-ebs to ebs.csi.aws.com not backed up by Velero #560

Closed
Falcondevils opened this issue Mar 26, 2024 · 1 comment

Comments

@Falcondevils
Copy link

What steps did you take and what happened:
I have been having issues with Velero backup and restore of AWS EBS gp3 volume since these were moved to csi provisioner ebs.csi.aws.com in AWS EKS environment.
I went through some articles and was able to fix them.
However, I noticed that a few of the PVS are not backed up. On checking the logs I found the error ""reasons":[{"approach":"csiSnapshot","reason":"skipped b/c it's not a CSI volume"}]"

On deep dive, I found that the PVs which are not being backed up, they are not created by CSI provisioner but by kubernetes.io/aws-ebs to ebs.csi.aws.com provisioner and then migrated to CSI provisioner. These PVs still have annotations like
"pv.kubernetes.io/bound-by-controller: 'yes'
pv.kubernetes.io/migrated-to: ebs.csi.aws.com
pv.kubernetes.io/provisioned-by: kubernetes.io/aws-ebs"

So I am assuming due to the annotation "pv.kubernetes.io/provisioned-by: kubernetes.io/aws-ebs", Velero thinks it's not a CSI volume and ignores it from backup.

What did you expect to happen:
I thought Velero will back up the migrated pvs to CSI. I need a solution to this. Either Velero should consider other annotation "pv.kubernetes.io/migrated-to: ebs.csi.aws.com" also to decide that the PV is a CSI volume and back it up.
Or
Can someone suggest if I can edit the annotation "pv.kubernetes.io/provisioned-by: kubernetes.io/aws-ebs" to "pv.kubernetes.io/provisioned-by: kubernetes.io/ebs.csi.aws.com" and if that fixes the issue. Can this break anything??

The output of the following commands will help us better understand what's going on:

Anything else you would like to add:
Not really. Unfortunately i don't have a way to recreate the issue in Dev Env as I already have my k8 version updated to 1.29 and it will only support csi provisioner. Current issue i am facing is in QA/Staging/Prod so i am worried to take a chance and modify the annotation.

Environment:

  • helm version (use helm version):
  • helm chart version and app version (use helm list -n <YOUR NAMESPACE>): helm: 5.2.2 App:1.12.3
  • Kubernetes version (use kubectl version): 1.29
  • Kubernetes installer & version: 1.29(maintained by terraform)
  • Cloud provider or hardware configuration: AWS EKS
  • OS (e.g. from /etc/os-release):
    -NAME="Amazon Linux"
    VERSION="2"
    ID="amzn"
    ID_LIKE="centos rhel fedora"
    VERSION_ID="2"
    PRETTY_NAME="Amazon Linux 2"
    ANSI_COLOR="0;33"
    CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
    HOME_URL="https://amazonlinux.com/"
    SUPPORT_END="2025-06-30"
@Falcondevils
Copy link
Author

I got a workaround. I snapshotted the existing volume and create a new volume. Then i created PVCs/PVs manually with csi provisioner and attached the new volume with the new PV. That way i transitioned the pv from aws-ebs provisioner to aws-csi provisioner. That did the trick. So closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant