aboutsummaryrefslogtreecommitdiff
path: root/pkg/driver/nodeserver.go
AgeCommit message (Collapse)AuthorFilesLines
2025-12-06fix: 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
2025-12-06feat: Separated weed mount lifecycle into a dedicated service and rewired ↵泽淼 周1-15/+6
the CSI components to call it.
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 warningschrislusf1-2/+4
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 feedbackchrislusf1-50/+35
- 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-2/+102
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-06-06fix(driver): nomad compatibility errorduanhongyi1-1/+1
2024-03-29Use capacity of one byte as 'no quota'Viktor Kuzmin1-1/+4
2024-01-18Revert "chore(seaweedfs-csi-driver): delete unnecessary stage"chrislu1-27/+114
This reverts commit 44283c0ffe56e3180dae5b93801d07a3d621d355.
2024-01-18Revert "Fix: unable to properly clean mount points"chrislu1-42/+26
This reverts commit 4f60c279001475dcb398ed8c852ff2c6e366e16e.
2024-01-15Fix: unable to properly clean mount pointsduanhongyi1-26/+42
2024-01-11chore(seaweedfs-csi-driver): delete unnecessary stageduanhongyi1-114/+27
2024-01-11Fix: capacity error in re mounting after expand volumeduanhongyi1-1/+10
2023-08-10Removed unused fieldn91-2/+1
2023-08-07Node and controller servers small code cleanup, some more loggingViktor Kuzmin1-20/+23
2023-08-07Graceful stop with mounts cleanupViktor Kuzmin1-0/+14
2023-08-06Use single instance of mount utility - mount.New is expensiveViktor Kuzmin1-4/+2
2023-08-06Update dependencies, move from deprecated k8s.io/utils/mount to ↵Viktor Kuzmin1-1/+1
k8s.io/mount-utils
2023-04-22-fixed several csi sanity testswashcycle1-1/+13
-removed deprecated/unneeded passthrough import -added test.sh (needs work)
2022-09-03Remove linux specific magic from fuse process start/stop.Viktor Kuzmin1-9/+22
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-0/+10
2022-07-29move to github.com/seaweedfs/seaweedfschrislu1-1/+1
2022-07-15Fix #70: use bind mount rather than symbolic linkgarenchan1-1/+1
2022-07-07Pods using the same volume share mountgarenchan1-58/+133
2022-07-01Fix error when managing multiple volumesgarenchan1-28/+5
2022-04-15fix VolumeExpansion not workjoy7171-3/+4
2022-04-12fix collectionQuotaMB=0 alwaysjoy7171-2/+13
2022-04-03support expand volumechrislu1-5/+21
2022-03-18set disk type from either volumeAttributes or request parametersv1.0.8chrislu1-0/+4
related to https://github.com/seaweedfs/seaweedfs-csi-driver/issues/50
2021-09-28Allow static persistent volumes, some code cleanupViktor Kuzmin1-5/+11
2021-01-27Match variable names to Context instead of ParametersDaniel Santos1-2/+2
2021-01-20Use VolumeContextDaniel Santos1-3/+1
2021-01-20TroubleshootingDaniel Santos1-0/+2
2021-01-20Use PublishContext insteadDaniel Santos1-1/+1
2021-01-20Add mount arguments as CSI volume parametersDaniel Santos1-2/+4
2021-01-11refactoringChris Lu1-1/+1
2020-09-04add loggingChris Lu1-2/+2
2020-06-12adjust logsChris Lu1-2/+2
2020-06-11loggingChris Lu1-1/+3
2020-06-09skip checkingChris Lu1-1/+1
2020-06-02compileChris Lu1-1/+4
2020-06-01configure filer via CLIChris Lu1-2/+1
2020-05-31it can compile now!Chris Lu1-9/+66
2020-03-19WIPChris Lu1-0/+105