[BUG] Extra snapshot generated when clone from a detached volume #5986
Closed
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:
- Dynamic provision volume1
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: source-pvc
spec:
storageClassName: longhorn
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
- 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
- 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
Metadata
Assignees
Labels
Type
Projects
Status
Closed