Skip to content

Commit ca40731

Browse files
authored
update skipRecoveryQueue clone logic
Fall back to the source volume's skipRecoveryQueue setting when not explicitly set on the clone.
1 parent fa25647 commit ca40731

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

core/concurrent_core.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2417,7 +2417,11 @@ func (o *ConcurrentTridentOrchestrator) cloneVolume(
24172417
cloneConfig.ReadOnlyClone = volConfig.ReadOnlyClone
24182418
cloneConfig.Namespace = volConfig.Namespace
24192419
cloneConfig.RequestName = volConfig.RequestName
2420-
cloneConfig.SkipRecoveryQueue = volConfig.SkipRecoveryQueue
2420+
2421+
// If skipRecoveryQueue is set for the clone, use it. If not, default to the source volume's setting.
2422+
if volConfig.SkipRecoveryQueue != "" {
2423+
cloneConfig.SkipRecoveryQueue = volConfig.SkipRecoveryQueue
2424+
}
24212425

24222426
// If it's from snapshot, we need the LUKS passphrases value from the snapshot
24232427
isLUKS, err := strconv.ParseBool(cloneConfig.LUKSEncryption)

core/orchestrator_core.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2474,7 +2474,12 @@ func (o *TridentOrchestrator) cloneVolumeInitial(
24742474
cloneConfig.ReadOnlyClone = volumeConfig.ReadOnlyClone
24752475
cloneConfig.Namespace = volumeConfig.Namespace
24762476
cloneConfig.RequestName = volumeConfig.RequestName
2477-
cloneConfig.SkipRecoveryQueue = volumeConfig.SkipRecoveryQueue
2477+
2478+
// If skipRecoveryQueue is set for the clone, use it. If not, default to the source volume's setting.
2479+
if volumeConfig.SkipRecoveryQueue != "" {
2480+
cloneConfig.SkipRecoveryQueue = volumeConfig.SkipRecoveryQueue
2481+
}
2482+
24782483
// Empty out the export policy. It will be set in the backend driver.
24792484
cloneConfig.ExportPolicy = ""
24802485

0 commit comments

Comments
 (0)