Skip to content

Conversation

@sambuc
Copy link

@sambuc sambuc commented Dec 17, 2025

No description provided.

kanya-approve and others added 9 commits November 26, 2025 11:09
* Ensure the mutex is not copied, even when the nodeServer is copied by
  storing a pointer to the mutex, instead of the mutex itself.

* Use Mutex instead of RWMutex, as having two readers of the variable at
  the same time means we are going to write the state at the same time,
  corrupting the state file on storage.

* Mutex / RWMutex are not recursive / re-entrant in Go, so in two cases
  we do not call `Unlock()` through `defer` as `persistState()` also
  takes the lock.

* As a rule of thumb, Locking a Mutex should be as close as possible to
  the resource requiring it, to minimize the size of the critical
  section / the time spent holding the lock.

* Remount each volume in a goroutine, with a rate limits of the number
  of active routine to prevent contention, and keep under control
  startup times.
* Refactor
  * CLI code
  * servers configurations
  * ControllerServer
  * NodeServer

* Cleanup warnings in:
  * controllerserver.go
  * main.go

* Use tags to specify json field names on permanent storage

* Make DriverVersion a constant

* Protect activeVolume while reading for the metrics

* Compute len(ns.mountedVolumes) once
 - Use a folder name on the host which contains the deployment, to
   prevent conflicts in case of multiple deployment on the same host.

 - Cleaned up a bit the templates to make it easier to compare.

 - Use a folder under /tmp so that state is cleaned on node reboot, but
   kept between pod/container restarts

---------

Co-authored-by: Tasko Olevski <olevski90@gmail.com>
@sambuc sambuc force-pushed the build/csi-rclone-improvements-2 branch from 43c9cca to 26767ca Compare December 17, 2025 13:46
@sambuc sambuc force-pushed the build/csi-rclone-improvements-2 branch 2 times, most recently from a1d7a8d to f25e465 Compare January 22, 2026 09:59
@sambuc sambuc force-pushed the build/csi-rclone-improvements-2 branch from f25e465 to 2842e94 Compare January 30, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants