Skip to content

Creating snapshot with pre-provisioned contents with different namespace outputs wrong error.  #677

@651juan

Description

@651juan

What happened:
Create snapshot content X with volumeSnapshotRef field and namespace: one . Create snapshot Y with namespace two. Error outputs Failed to check and update snapshot: VolumeSnapshotContent [X] is bound to a different snapshot

What you expected to happen:
A different error message such as "Snapshot not found"
How to reproduce it:

X snapshot content:

      apiVersion: snapshot.storage.k8s.io/v1
      kind: VolumeSnapshotContent
      metadata:
        name: "content"
        namespace: "one"
      spec:
        deletionPolicy: Retain
        driver: ebs.csi.aws.com
        source:
          snapshotHandle: "aws_handle"
        volumeSnapshotRef:
          name: "snapshot"
          namespace: "one"

Y Snapshot:

      apiVersion: snapshot.storage.k8s.io/v1
      kind: VolumeSnapshot
      metadata:
        name: "snapshot"
        namespace: "two"
      spec:
        source:
          volumeSnapshotContentName: "content"

Anything else we need to know?:

Environment:

  • Driver version: 5.0.1
  • Kubernetes version (use kubectl version): 1.21

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions