Skip to content

tridentctl import renames and deletes volume in Netapp #771

@Ujkugri

Description

@Ujkugri

Describe the bug
We are in a kubernetes environment and when using the following command

cat <<EOF | kubectl exec -n trident -it trident-csi-xxx -- tridentctl import volume ontap-san trident_pvc_23c1a0aa_61a4_439a_bfa6_5f992d013935_5646 -f -
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  annotations:
    meta.helm.sh/release-name: xxx
    meta.helm.sh/release-namespace: xxx
  labels:
    app.kubernetes.io/component: xxx
    app.kubernetes.io/instance: xxx
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: xxx
    helm.sh/chart: xxx
  name: xxx
  namespace: xxx
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 10Gi
  storageClassName: netapp-san
EOF

it is not importing the volume, but renaming and deleting it. If we look in the ONTAP System Manager, we see that a Volume was delete, but with a different name.

Environment

  • Trident version: 22.07.0
  • Trident installation flags used: via helmchart operator
  • Container runtime: docker://20.10.17
  • Kubernetes version: 1.22.9
  • Kubernetes orchestrator: Rancher v2.6.6
  • OS: Ubuntu 20.04.4 LTS]
  • NetApp backend types: ONTAP SAN

Expected behavior
It should just import it, so when you do

kubectl exec -n trident -it trident-csi-xxx -- tridentctl get volume

you the volume you imported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions