aboutsummaryrefslogtreecommitdiff
path: root/pkg/driver/volume.go
AgeCommit message (Collapse)AuthorFilesLines
2025-12-06fix: address code review feedbackchrislusf1-1/+1
- 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)
2025-12-06Optimization: Reduce unnecessary logic of seaweedfs-mount泽淼 周1-7/+20
2025-12-06feat: Separated weed mount lifecycle into a dedicated service and rewired ↵泽淼 周1-19/+9
the CSI components to call it.
2025-12-03fix: propagate errors instead of just logging warningschrislusf1-1/+2
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-03refactor: address code review feedbackchrislusf1-6/+1
- 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 restartchrislusf1-5/+18
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
2024-03-29Use capacity of one byte as 'no quota'Viktor Kuzmin1-0/+5
2024-01-18Revert "chore(seaweedfs-csi-driver): delete unnecessary stage"chrislu1-17/+51
This reverts commit 44283c0ffe56e3180dae5b93801d07a3d621d355.
2024-01-18Revert "Fix: unable to properly clean mount points"chrislu1-33/+40
This reverts commit 4f60c279001475dcb398ed8c852ff2c6e366e16e.
2024-01-15Fix: unable to properly clean mount pointsduanhongyi1-40/+33
2024-01-11chore(seaweedfs-csi-driver): delete unnecessary stageduanhongyi1-51/+17
2024-01-11Fix: capacity error in re mounting after expand volumeduanhongyi1-1/+1
2023-08-10Added missing argn91-1/+1
2023-08-07Graceful stop with mounts cleanupViktor Kuzmin1-2/+19
2023-08-06Use single instance of mount utility - mount.New is expensiveViktor Kuzmin1-5/+3
2023-08-06Update dependencies, move from deprecated k8s.io/utils/mount to ↵Viktor Kuzmin1-5/+5
k8s.io/mount-utils
2022-09-03Rename Mount interface to UnmounterViktor Kuzmin1-6/+6
2022-09-03Remove linux specific magic from fuse process start/stop.Viktor Kuzmin1-44/+20
Use pid from cmd.Process instead of /proc lookup Use mount specific mutex Log fuse mount process stderr and stdout for problems investigation
2022-08-20Make sure mount point is cleaned up even if we think we're not managing itViktor Kuzmin1-16/+2
2022-08-16fix an error to return correct resultGaren Chan1-1/+1
2022-07-29move to github.com/seaweedfs/seaweedfschrislu1-2/+2
2022-07-15Fix #70: use bind mount rather than symbolic linkgarenchan1-7/+20
2022-07-07Fix error to avoid zombie processesgarenchan1-6/+1
2022-07-07Pods using the same volume share mountgarenchan1-0/+147