From 243f36f29e5e8fc42c1ae82026bdd6441d752cb9 Mon Sep 17 00:00:00 2001 From: andyzhangx Date: Wed, 28 Aug 2024 11:31:26 +0000 Subject: [PATCH] fix: upgrade csi-provisioner to v5.0.2 --- charts/v1.15.0/csi-driver-smb-v1.15.0.tgz | Bin 4955 -> 4957 bytes charts/v1.15.0/csi-driver-smb/values.yaml | 2 +- cmd/smbplugin/main.go | 2 ++ deploy/v1.15.0/csi-smb-controller.yaml | 2 +- pkg/smb/controllerserver.go | 8 ++++++-- pkg/smb/smb.go | 3 +++ 6 files changed, 13 insertions(+), 4 deletions(-) diff --git a/charts/v1.15.0/csi-driver-smb-v1.15.0.tgz b/charts/v1.15.0/csi-driver-smb-v1.15.0.tgz index 80c35546d500f5fec3363e1d79d6183039c7bde9..da32c96bc81accdce40e8ba5024b5b23e7374d53 100644 GIT binary patch delta 4940 zcmV-S6SM5wCfz2GK7ZRdwx7QZ^g9sl06Vj{@*}U=D zUe(5ZBMHakH(;F5$VKyE2gh;YYj1em8+3f&9wV_(4@V!~p|jC@bgpCuO(;WuOUA$= z5WqVT4#7obnd;1|1iy5f_bE>m{h#9?0ls4cuw4I#gM;IPs{S9G9Pai1B@zko6xv=SZgyiipzye$( zSOVxZ`uhwb_4y4lc@fr`Ir>b30FA*E@s&4O(4>b(AdsMFf&&hSOyooK8As}2!a;s# zh<=WGl7AnK1fxL!OnV+4j-C9O!?78Q{H^M5jyoMT#$L6`GPm+#(sgz8sJO+4J&zM3 z=bg?3ut=B^9*FQbfS*D9MuQ}Tk-&l*lAS^wGg9@scGR#1#KYW0a=iVBr@ej_BwPUd zD`8yxoru{ll#5Fc2)#ylj!7VSBW=B1bPf}o1b^a9Q>pTc4niRaMm&B^nQ+m;|DGHj z+0|nPI1sZuo0JZgL|4%VEXlcg#L|anx@Fe^jv#*((CM!*hrmV09fUqpc2A<|2PqKe zgt@5O7h&90UBPL>Jm8wO%^1i!hD7l6n`}s^ME-Cv_(0542LDQc7jt=W;-cXotQ9** z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t(Ef^e6#+yk!s_AY>ZvU1OcBk{?|J=>VNkt@xT4= zzdTQ>EX@}$u2kx%w5xnjJUtmcDim2B4P0?A<}O2nPf_12DznR)K0GAWtQI=E~M z)O#F@8D-?(%Dz|6?du=xx~4uXZ>pkY{I3J|Le9wi{QZsU3eLujVzIBmf+JDxFO0?! zAEJM>+y88pP{}{qk!%ka5Pu2-GEAm9u(8T81<`(k+CJgxuliXp`9XJ${1hdRJn1_@ z5!isUx>c|-dmVMQ@haY;VB>6ZxIX5*VS^jC3FZ)r4Z6^@Chg3Pn&omLm1L(4+KQk{ zDf38}R}LEwrM^$oY1Yv %s", internalVolumePath, archivedInternalVolumePath) - if err = os.RemoveAll(archivedInternalVolumePath); err != nil { - return nil, status.Errorf(codes.Internal, "failed to delete archived subdirectory %s: %v", archivedInternalVolumePath, err.Error()) + if d.removeArchivedVolumePath { + klog.V(2).Infof("removing archived subdirectory at %v", archivedInternalVolumePath) + if err = os.RemoveAll(archivedInternalVolumePath); err != nil { + return nil, status.Errorf(codes.Internal, "failed to delete archived subdirectory %s: %v", archivedInternalVolumePath, err.Error()) + } + klog.V(2).Infof("removed archived subdirectory at %v", archivedInternalVolumePath) } if err = os.Rename(internalVolumePath, archivedInternalVolumePath); err != nil { return nil, status.Errorf(codes.Internal, "archive subdirectory(%s, %s) failed with %v", internalVolumePath, archivedInternalVolumePath, err.Error()) diff --git a/pkg/smb/smb.go b/pkg/smb/smb.go index e2550befe38..d98de18dae2 100644 --- a/pkg/smb/smb.go +++ b/pkg/smb/smb.go @@ -68,6 +68,7 @@ type DriverOptions struct { Krb5CacheDirectory string Krb5Prefix string DefaultOnDeletePolicy string + RemoveArchivedVolumePath bool } // Driver implements all interfaces of CSI drivers @@ -86,6 +87,7 @@ type Driver struct { krb5CacheDirectory string krb5Prefix string defaultOnDeletePolicy string + removeArchivedVolumePath bool } // NewDriver Creates a NewCSIDriver object. Assumes vendor version is equal to driver version & @@ -97,6 +99,7 @@ func NewDriver(options *DriverOptions) *Driver { driver.NodeID = options.NodeID driver.enableGetVolumeStats = options.EnableGetVolumeStats driver.removeSMBMappingDuringUnmount = options.RemoveSMBMappingDuringUnmount + driver.removeArchivedVolumePath = options.RemoveArchivedVolumePath driver.workingMountDir = options.WorkingMountDir driver.volumeLocks = newVolumeLocks()