From b7fd17f352b5dd96b3a05fb5e02d12c434cf3c85 Mon Sep 17 00:00:00 2001 From: sivakumar subraani Date: Tue, 21 Nov 2023 17:56:01 +0000 Subject: [PATCH] pb-4969: Fixed issue with backuplocation CR variable, which was causing the nfs backup issue. - backuplocation CR variable scope was lost inside the if condtion. Because of this the nfs parameters are not passed to kopia job. - The kopia writes the snapshot file directly inside the job pod file system and files are lost once the pod is completed. - Since the nfs parameters are not passed, the nfs pvc was not getting mounted inside the nfs job pod. --- pkg/controllers/dataexport/reconcile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/controllers/dataexport/reconcile.go b/pkg/controllers/dataexport/reconcile.go index e4e2e99b3..d4d0a8e1c 100644 --- a/pkg/controllers/dataexport/reconcile.go +++ b/pkg/controllers/dataexport/reconcile.go @@ -287,7 +287,7 @@ func (c *Controller) sync(ctx context.Context, in *kdmpapi.DataExport) (bool, er blNamespace = vb.Spec.BackupLocation.Namespace } - backupLocation, err := readBackupLocation(blName, blNamespace, "") + backupLocation, err = readBackupLocation(blName, blNamespace, "") if err != nil { msg := fmt.Sprintf("reading of backuplocation [%v/%v] failed: %v", blNamespace, blName, err) logrus.Errorf(msg)