aboutsummaryrefslogtreecommitdiff
path: root/pkg/driver
AgeCommit message (Collapse)AuthorFilesLines
14 daysfix: address gemini review - OnDelete strategy and log invalid endpointchrislusf1-1/+3
- Change seaweedfs-mount DaemonSet updateStrategy from RollingUpdate to OnDelete in seaweedfs-csi.yaml for consistency with values.yaml (safer for active mounts) - Add warning log when invalid mountEndpoint is provided to aid debugging
14 daysfix: address PR review commentschrislusf1-3/+5
- Set localSocket in rebuildVolumeFromStaging to fix invalid gRPC target - Use SHA256 hash (16 hex chars) in LocalSocketPath to minimize collision risk - Update GitHub Actions to latest versions (checkout@v4, metadata-action@v5, etc.) - Fix volumeMounts/volumes conditional mismatch in helm templates - Add documentation for mountService defaults in values.yaml
14 daysfix: address code review feedbackchrislusf3-12/+25
- CRITICAL: Make socket path configurable based on mountEndpoint - Added volumeSocketDir field to SeaweedFsDriver - LocalSocketPath now accepts baseDir parameter - Derived from mountEndpoint for user-configurable socket paths - HIGH: Pin seaweedfs version in Dockerfiles for reproducible builds - Added SEAWEEDFS_VERSION build arg (default: 3.80) - Clone specific tag instead of master - HIGH: Fix Dockerfile.dev to use local context instead of personal fork - Removed hardcoded zemul/seaweedfs-csi-driver clone - Now uses COPY . . for local development - HIGH: Change :latest to :dev in kubernetes manifests - Mutable :latest tag replaced with :dev for predictability - MEDIUM: Remove Aliyun mirror from Dockerfile.dev - Region-specific mirrors shouldn't be in general-purpose files - MEDIUM: Improve error handling in client.go - Now reports read errors when failing to read error response body - MEDIUM: Fix inconsistent error return in manager.go - Return nil instead of empty struct on error (Go idiom)
14 daysOptimization: Reduce unnecessary logic of seaweedfs-mount泽淼 周2-26/+145
14 daysfeat: Separated weed mount lifecycle into a dedicated service and rewired ↵泽淼 周5-318/+75
the CSI components to call it.
2025-12-03fix: use RemoveAll for more robust staging path cleanupv1.3.5chrislusf1-1/+2
Address gemini-code-assist review - use os.RemoveAll instead of os.Remove to handle cases where the directory is not empty after an imperfect unmount. This ensures complete cleanup of stale staging paths.
2025-12-03fix: cleanup volume mutex on self-healing failure in NodePublishVolumechrislusf1-0/+2
Address gemini-code-assist review - when cleanup or re-staging fails during self-healing in NodePublishVolume, remove the volume mutex to avoid leaving stale entries. This maintains consistency with NodeStageVolume's error handling behavior.
2025-12-03fix: cleanup staged mount on quota application failurechrislusf1-0/+4
Address CodeRabbit review - if volume.Stage() succeeds but volume.Quota() fails, clean up the staged mount before returning the error to avoid leaving an orphaned FUSE process.
2025-12-03fix: propagate errors instead of just logging warningschrislusf2-3/+6
Address gemini-code-assist review feedback: 1. Return error from volume.Quota() failure in stageNewVolume - quota failures should fail the staging operation 2. Return error from cleanupStaleStagingPath() in NodeStageVolume - fail fast if cleanup fails rather than attempting to stage anyway 3. Return error from cleanupStaleStagingPath() in NodePublishVolume - same fail-fast behavior for consistency 4. Return error from mount.CleanupMountPoint() in Volume.Unstage() - propagate cleanup errors to caller as expected
2025-12-03fix: preserve healthy mounts in NodeStageVolume instead of re-stagingchrislusf1-13/+13
Address CodeRabbit review - when a healthy staging path exists after driver restart, rebuild the cache using rebuildVolumeFromStaging() instead of cleaning up and re-staging. This: - Maintains consistency with NodePublishVolume behavior - Avoids disrupting existing published volumes that are bind-mounted - Makes NodeStageVolume idempotent as per CSI spec
2025-12-03fix: add nil checks for AccessMode to prevent panicchrislusf1-2/+10
Address CodeRabbit review feedback - add defensive nil checks for GetVolumeCapability() and GetAccessMode() in both isPublishVolumeReadOnly and isVolumeReadOnly to prevent potential nil pointer dereference.
2025-12-03refactor: address code review feedbackchrislusf3-59/+43
- Handle unexpected stat errors in cleanupStaleStagingPath (high priority) - Extract staging logic into stageNewVolume helper method for reuse - Extract isReadOnlyAccessMode helper to avoid duplicated read-only checks - Remove redundant mountutil.Unmount call (CleanupMountPoint already handles it)
2025-12-03fix: add self-healing for volume mount failures after driver restartchrislusf3-7/+205
This addresses issue #203 - CSI Driver Self-Healing for Volume Mount Failures. Problem: When the CSI node driver restarts, the in-memory volume cache is lost. Kubelet then directly calls NodePublishVolume (skipping NodeStageVolume), which fails with 'volume hasn't been staged yet' error. Solution: 1. Added isStagingPathHealthy() to detect healthy vs stale/corrupted mounts 2. Added cleanupStaleStagingPath() to clean up stale mount points 3. Enhanced NodeStageVolume to clean up stale mounts before staging 4. Implemented self-healing in NodePublishVolume: - If staging path is healthy: rebuild volume cache from existing mount - If staging path is stale: clean up and re-stage automatically 5. Updated Volume.Unstage to handle rebuilt volumes without unmounter Benefits: - Automatic recovery after CSI driver restarts - No manual intervention required (no kubelet/pod restarts needed) - Handles both live and dead FUSE mount scenarios - Backward compatible with normal operations Fixes #203
2025-10-23fix error messagev1.3.2chrislusf1-2/+2
2025-10-23Fix filer_pb API signatures to include context parameterchrislusf1-3/+3
The filer_pb.Mkdir, filer_pb.Remove, and filer_pb.Exists functions now require context.Context as the first parameter. This commit updates all three function calls in controllerserver.go to match the updated API. Fixes #206
2025-05-04Use only lowercase letters in the volume ID to avoid case matching issuesAaron Madsen1-0/+2
2025-05-04Make sure the volume ID is a valid bucket nameAaron Madsen1-5/+30
2024-07-21fix buildv1.2.1chrislu1-0/+1
2024-06-06fix(driver): nomad compatibility errorduanhongyi1-1/+1
2024-03-29Use capacity of one byte as 'no quota'Viktor Kuzmin2-1/+9
2024-01-18Revert "chore(seaweedfs-csi-driver): delete unnecessary stage"chrislu3-45/+166
This reverts commit 44283c0ffe56e3180dae5b93801d07a3d621d355.
2024-01-18Revert "Fix: unable to properly clean mount points"chrislu2-75/+66
This reverts commit 4f60c279001475dcb398ed8c852ff2c6e366e16e.
2024-01-15Fix: unable to properly clean mount pointsduanhongyi2-66/+75
2024-01-11chore(seaweedfs-csi-driver): delete unnecessary stageduanhongyi3-166/+45
2024-01-11Fix: capacity error in re mounting after expand volumeduanhongyi4-28/+11
2023-11-05Merge branch 'master' of https://github.com/seaweedfs/seaweedfs-csi-driverchrislu8-30/+12
2023-10-19Feat: add driver name supportduanhongyi1-7/+3
2023-09-25Revert "Revert "Merge branch 'master' of ↵chrislu1-1/+1
https://github.com/seaweedfs/seaweedfs"" This reverts commit 8cb42c39
2023-08-10Fix: the channel used with signal.Notify should be buffered (SA1017)n91-1/+1
2023-08-10Removed unused fieldn91-2/+1
2023-08-10Fix: error strings should not be capitalized (ST1005)n94-6/+6
Context: https://github.com/golang/go/wiki/CodeReviewComments#error-strings https://stackoverflow.com/a/68793833
2023-08-10Clean uselessn91-2/+0
2023-08-10Added missing argn91-1/+1
2023-08-10Removed unused methodn91-11/+0
2023-08-07Allow to separate ControllerServer and NodeServer, allow to disable attacher ↵Viktor Kuzmin1-7/+24
(it do nothing in reality)
2023-08-07gofmt of mounter_seaweedfsViktor Kuzmin1-32/+34
2023-08-07Log cache clear errorsViktor Kuzmin1-1/+4
2023-08-07Implement ExpandVolume also for controllerViktor Kuzmin2-0/+13
https://kubernetes-csi.github.io/docs/volume-expansion.html CSI Resizer should be always run even if not implemented. Also it should run only against controller. Volume resize on node rpc call is handled by kubelet. For now the only job for controller's volume resize is to make it two step and propagate changes to node.
2023-08-07Fix Add...Capability functions - capabilities now added instead of replacedViktor Kuzmin1-12/+3
2023-08-07Node and controller servers small code cleanup, some more loggingViktor Kuzmin2-55/+41
2023-08-07Graceful stop with mounts cleanupViktor Kuzmin4-7/+60
2023-08-07Use SIGTERM for shutting down weed mount, adjust timeoutsViktor Kuzmin1-3/+4
2023-08-06Use single instance of mount utility - mount.New is expensiveViktor Kuzmin5-19/+14
2023-08-06Update dependencies, move from deprecated k8s.io/utils/mount to ↵Viktor Kuzmin5-13/+13
k8s.io/mount-utils
2023-04-26build fixeswashcycle2-11/+3
2023-04-26revert changewashcycle1-4/+1
2023-04-26Implement CSI Test Suitewashcycle3-10/+17
Fixes #115
2023-04-22-fixed several csi sanity testswashcycle2-3/+38
-removed deprecated/unneeded passthrough import -added test.sh (needs work)
2023-01-20Merge branch 'master' of https://github.com/seaweedfs/seaweedfs-csi-driverchrislu3-4/+64
2023-01-20grpc connection to filer add sw-client-id headerchrislu1-1/+3