| Age | Commit message (Collapse) | Author | Files | Lines |
|
- Log warning if stopping mount process fails after mount wait timeout
to help diagnose potential zombie processes
- Add comment explaining the 100ms delay before unmounting is for
FUSE cleanup and pending I/O to complete
|
|
- Change image tags from :dev to :latest in seaweedfs-csi.yaml for
predictable production deployments
- Replace deprecated IsMountPoint with IsLikelyNotMountPoint for
consistency with k8s.io/mount-utils recommendations
|
|
The weedMountProcess.wait() function already handles unmounting when the
process terminates. Removing the explicit unmount call in Unmount()
centralizes the unmount logic and avoids potential race conditions.
|
|
- Unmount now uses getMount first, only removes from state after all
cleanup operations succeed (transactional behavior)
- Add volume ID prefix to weed mount stdout/stderr logs for better
debugging when multiple mounts are active
|
|
- Change cacheDir permissions from 0750 to 0755 for non-root access
- Change targetPath (mount point) permissions from 0750 to 0755
- Remove ineffective os.ErrProcessDone checks (not exported in os package)
|
|
- 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
|
|
- Change mountService updateStrategy from RollingUpdate to OnDelete
(mount service not yet resilient to its own restarts)
- Change mountService image from :latest to :dev for consistency
- Fix defer os.RemoveAll: explicitly remove cache dir after process stops
to avoid removing while process might still be running
|
|
- 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
|
|
directory exists
Address review feedback from gemini-code-assist:
- Replace recursive approach with non-recursive to avoid potential stack overflow
- Always call os.MkdirAll at the end to ensure directory exists after unmount
- Add better error messages with context
- Add logging for unmount operations
|
|
- 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)
|
|
|
|
|
|
|
|
|
|
the CSI components to call it.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
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
|
|
Address CodeRabbit review feedback - add defensive nil checks for
GetVolumeCapability() and GetAccessMode() in both isPublishVolumeReadOnly
and isVolumeReadOnly to prevent potential nil pointer dereference.
|
|
- 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)
|
|
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
|
|
|
|
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
|
|
|
|
|
|
|
|
fix https://github.com/seaweedfs/seaweedfs-csi-driver/issues/169
|
|
|
|
|
|
This reverts commit 44283c0ffe56e3180dae5b93801d07a3d621d355.
|
|
This reverts commit 4f60c279001475dcb398ed8c852ff2c6e366e16e.
|
|
|
|
|
|
|
|
|
|
|
|
https://github.com/seaweedfs/seaweedfs""
This reverts commit 8cb42c39
|
|
|
|
|
|
Context:
https://github.com/golang/go/wiki/CodeReviewComments#error-strings
https://stackoverflow.com/a/68793833
|
|
|
|
|
|
|
|
(it do nothing in reality)
|
|
|
|
|
|
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.
|
|
|