3145: Add -readonly flag. Accept multiple -volume arguments.
authorTom Clegg <tom@curoverse.com>
Thu, 16 Apr 2015 16:16:53 +0000 (12:16 -0400)
committerTom Clegg <tom@curoverse.com>
Thu, 16 Apr 2015 16:16:53 +0000 (12:16 -0400)
commit41caa50724d03189c5b4104c52bd5253974cf535
treea6d816e16a82fa9444c3f8a39b66b783fd7f2872
parent397191893819083925600a61e2f355a3b6513354
3145: Add -readonly flag. Accept multiple -volume arguments.

* Leave -volumes (and accept comma-separated dir lists) for backward
  compatibility.

* Detect read-only filesystems when using /proc/mounts to discover
  Keep volumes.

* VolumeManagers know whether volumes are writable, so it's not
  necessary to wait in a serialize queue just to find out a volume
  isn't writable.

* Simplify RRVolumeManager: use atomic.AddUint32() instead of channels
  and goroutines.

* -serialize (like -readonly) now affects only the volumes that come
  after it in the argument list (and automatically discovered
  volumes). This makes it possible to have a mix of serialized and
  non-serialized volumes.

* Fix some test cases that just skipped the test (instead of failing)
  when encountering an error during test setup.

* Move MockVolume code from volume.go to volume_test.go.

* Clean up some over-indented code blocks, see
  https://github.com/golang/go/wiki/CodeReviewComments#indent-error-flow

* Remove some stating-the-obvious/redundant comments and duplicate log
  messages.
12 files changed:
docker/keep/run-keep.in
sdk/python/tests/run_test_server.py
services/keepstore/handler_test.go
services/keepstore/handlers.go
services/keepstore/keepstore.go
services/keepstore/keepstore_test.go
services/keepstore/trash_worker.go
services/keepstore/trash_worker_test.go
services/keepstore/volume.go
services/keepstore/volume_test.go [new file with mode: 0644]
services/keepstore/volume_unix.go
services/keepstore/volume_unix_test.go