diff --git a/go.mod b/go.mod index 5e382365..62de59e2 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/hashicorp/go-version v1.6.0 github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0 github.com/kubernetes-incubator/external-storage v0.20.4-openstorage-rc7 - github.com/libopenstorage/stork v1.4.1-0.20241029051218-6fcdc46e8ffc + github.com/libopenstorage/stork v1.4.1-0.20241115121844-591347b4e097 github.com/portworx/pxc v0.33.0 github.com/portworx/sched-ops v1.20.4-rc1.0.20240812234304-948bf116243e github.com/sirupsen/logrus v1.9.3 diff --git a/go.sum b/go.sum index e19faf73..358a806e 100644 --- a/go.sum +++ b/go.sum @@ -3394,8 +3394,8 @@ github.com/libopenstorage/stork v1.4.1-0.20230502135851-9cacb19e1df5/go.mod h1:R github.com/libopenstorage/stork v1.4.1-0.20230519043154-cbc10dffaf19/go.mod h1:Xm4DHoViynFXMQKBXGj3IkA77LY2RBFkNtv6vbo3wNw= github.com/libopenstorage/stork v1.4.1-0.20230601053837-5dd68f026569/go.mod h1:+mKPMCPNhS/XOF2RPcNFijkr67CCCWp0o8OXVG6xxAk= github.com/libopenstorage/stork v1.4.1-0.20230610103146-72cf75320066/go.mod h1:Yst+fnOYjWk6SA5pXZBKm19wtiinjxQ/vgYTXI3k80Q= -github.com/libopenstorage/stork v1.4.1-0.20241029051218-6fcdc46e8ffc h1:awMZ+7AxZQMSZQ8MXfJJfs/f1bQNeWyRTm2M7ZpiGUk= -github.com/libopenstorage/stork v1.4.1-0.20241029051218-6fcdc46e8ffc/go.mod h1:6LHv0kJyrIftmHrS+Xx59SCMqDdclnXdi14vrTafFxg= +github.com/libopenstorage/stork v1.4.1-0.20241115121844-591347b4e097 h1:FmNAsrl3gOZP2WCC9zKAyGxGxG67Vi15aaFZS1DtN7k= +github.com/libopenstorage/stork v1.4.1-0.20241115121844-591347b4e097/go.mod h1:NRQF3hftRQG4moohiYUCt/tY9JEUhV0BuBRxeAJj0x8= github.com/libopenstorage/systemutils v0.0.0-20160208220149-44ac83be3ce1/go.mod h1:xwNGC7xiz/BQ/wbMkvHujL8Gjgseg+x41xMek7sKRRQ= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de h1:9TO3cAIGXtEhnIaL+V+BEER86oLrvS+kWobKpbJuye0= github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE= diff --git a/vendor/github.com/libopenstorage/stork/drivers/volume/portworx/portworx.go b/vendor/github.com/libopenstorage/stork/drivers/volume/portworx/portworx.go index 4eb38f7d..276e9cf2 100644 --- a/vendor/github.com/libopenstorage/stork/drivers/volume/portworx/portworx.go +++ b/vendor/github.com/libopenstorage/stork/drivers/volume/portworx/portworx.go @@ -4385,7 +4385,7 @@ func (p *portworx) IsVirtualMachineSupported() bool { } func (p *portworx) getVirtLauncherPatches(podNamespace string, pod *v1.Pod) ([]k8sutils.JSONPatchOp, error) { - if pod.Labels["kubevirt.io"] != "virt-launcher" { + if pod.Labels["kubevirt.io"] != "virt-launcher" || storkvolume.SkipKubevirtPreloadStatfs { return nil, nil } diff --git a/vendor/github.com/libopenstorage/stork/drivers/volume/volume.go b/vendor/github.com/libopenstorage/stork/drivers/volume/volume.go index a20cc79e..74d8a981 100644 --- a/vendor/github.com/libopenstorage/stork/drivers/volume/volume.go +++ b/vendor/github.com/libopenstorage/stork/drivers/volume/volume.go @@ -77,6 +77,12 @@ var ( CSIDriverName, KDMPDriverName, } + + // `kubevirt-skip-preload-statfs=true` stork argument can be configured + // by the user as per their need through which stork can get to know if to + // actually create the configmap and mount the ld.so.preload and px_statfs.so + // shared lib onto the virt-launcher container. + SkipKubevirtPreloadStatfs bool ) // Driver defines an external volume driver interface. diff --git a/vendor/github.com/libopenstorage/stork/pkg/applicationmanager/controllers/applicationbackup.go b/vendor/github.com/libopenstorage/stork/pkg/applicationmanager/controllers/applicationbackup.go index ca8e658c..92507bab 100644 --- a/vendor/github.com/libopenstorage/stork/pkg/applicationmanager/controllers/applicationbackup.go +++ b/vendor/github.com/libopenstorage/stork/pkg/applicationmanager/controllers/applicationbackup.go @@ -1012,7 +1012,8 @@ func (a *ApplicationBackupController) backupVolumes(backup *stork_api.Applicatio if volInfo.Status == stork_api.ApplicationBackupStatusFailed { continue } - if volInfo.BackupID == "" { + // Check if the snapshot is completed only for pxd volumes by checking the backupID + if volInfo.DriverName == volume.PortworxDriverName && volInfo.BackupID == "" { log.ApplicationBackupLog(backup).Infof("Snapshot of volume [%v] from namespace [%v] hasn't completed yet, retry checking status", volInfo.PersistentVolumeClaim, volInfo.Namespace) // Some portworx volume snapshot is not completed yet // hence we will retry checking the status in the next reconciler iteration @@ -2075,7 +2076,6 @@ func (a *ApplicationBackupController) backupResources( if err != nil { return err } - return nil } // Do any additional preparation for the resources if required if err = a.prepareResources(backup, allObjects); err != nil { diff --git a/vendor/github.com/libopenstorage/stork/pkg/snapshotter/snapshotter_csi.go b/vendor/github.com/libopenstorage/stork/pkg/snapshotter/snapshotter_csi.go index 969400d3..f23966ab 100644 --- a/vendor/github.com/libopenstorage/stork/pkg/snapshotter/snapshotter_csi.go +++ b/vendor/github.com/libopenstorage/stork/pkg/snapshotter/snapshotter_csi.go @@ -1682,7 +1682,7 @@ func (c *csiDriver) createJob(pvc *v1.PersistentVolumeClaim, namespace string) ( } // Setup service account - if err := utils.SetupServiceAccount(jobName, namespace, roleFor()); err != nil { + if err := utils.SetupServiceAccount(jobName, namespace, pvc.Name, roleFor()); err != nil { errMsg := fmt.Sprintf("error creating service account %s/%s: %v", namespace, jobName, err) logrus.Errorf(errMsg) return nil, fmt.Errorf(errMsg) diff --git a/vendor/modules.txt b/vendor/modules.txt index ed20a18d..dd334272 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -505,7 +505,7 @@ github.com/libopenstorage/openstorage-sdk-clients/sdk/golang github.com/libopenstorage/secrets github.com/libopenstorage/secrets/aws/credentials github.com/libopenstorage/secrets/k8s -# github.com/libopenstorage/stork v1.4.1-0.20241029051218-6fcdc46e8ffc +# github.com/libopenstorage/stork v1.4.1-0.20241115121844-591347b4e097 ## explicit; go 1.21 github.com/libopenstorage/stork/drivers github.com/libopenstorage/stork/drivers/volume