Skip to content

[BUG] Extra snapshot generated when clone from a detached volume #5986

Closed
@chriscchien

Description

Describe the bug (🐛 if you encounter this issue)

From test case test_cloning_with_detached_source_volume

Clone a volume from a detached volume will create extra 1 snapshot in source volume, make test case fail.

In v1.4.2

  • Clone from attached volume : 2 snapshots created in the source volume
  • Clone from detached volume : 1 snapshot created in the source volume

master-head

  • Clone from attached volume : 2 snapshots created in the source volume
  • Clone from detached volume : 2 snapshot created in the source volume

To Reproduce

Steps to reproduce the behavior:

  1. Dynamic provision volume1
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: source-pvc
spec:
  storageClassName: longhorn
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 3Gi
  1. Clone volume1 by below manifest
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: cloned-pvc
spec:
  storageClassName: longhorn
  dataSource:
    name: source-pvc
    kind: PersistentVolumeClaim
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 3Gi
  1. After clone complete, volume 1 have 2 snapshots(not include volume-head), in previous version only new 1 generated.

Expected behavior

Do not generate extra snapshot as before or have test code update to match new behavior.

Log or Support bundle

N/A

Environment

  • Longhorn version: master-head
  • Installation method (e.g. Rancher Catalog App/Helm/Kubectl): kubectl
  • Kubernetes distro (e.g. RKE/K3s/EKS/OpenShift) and version: v1.24.7+k3s1

Additional context

test_inc_restoration_with_multiple_rebuild_and_expansion

Metadata

Labels

area/snapshotVolume snapshot (in-cluster snapshot or external backup)backport/1.4.3kind/bugkind/regressionRegression which has worked beforepriority/0Must be implement or fixed in this release (managed by PO)reproduce/always100% reproducibleseverity/3Function working but has a major issue w/ workaround

Type

No type

Projects

  • Status

    Closed

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions