Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
339 commits
Select commit Hold shift + click to select a range
6095293
[#112021105] - Initial Implementation ListDrivers w/Drivers
lwoydziak Feb 17, 2016
e53766f
Initial Implementation ListDrivers w/Drivers
lwoydziak Feb 18, 2016
610f3f2
Initial Implementation ListDrivers w/Drivers
lwoydziak Feb 18, 2016
b68010f
Add comments to readme
lwoydziak Feb 22, 2016
6f3232a
[#112020877] - wip
lwoydziak Feb 19, 2016
43d9044
Package restructure based on code review
Feb 25, 2016
aafef6d
Refactored based on code review comments (WiP)
Feb 29, 2016
9a4dd7d
Added test for driver Info
Feb 29, 2016
cc473d3
Refactored ListDrivers to invoke info api for all available drivers
midoblgsm Feb 29, 2016
d2f6e47
Improved test coverage for driver
Feb 29, 2016
5f69845
Adding tests to handlers.
midoblgsm Feb 29, 2016
d7939d5
Refactored volman to separate out driver from manager
Mar 1, 2016
1080b3e
Minor refactoring for naming consistency
Mar 1, 2016
b863b28
Improve error message
Mar 2, 2016
e1ae40f
Add unmount
lwoydziak Mar 4, 2016
70c521d
debugging cephdriver
Mar 4, 2016
8f16693
Merge branch 'master' of github.com:cloudfoundry-incubator/volman
midoblgsm Mar 4, 2016
7cf548b
Fixed bug in invoker cli
midoblgsm Mar 4, 2016
f11d3c7
wip
Mar 5, 2016
2262af0
Working main tests
Mar 7, 2016
9864166
debugging cephdriver
Mar 4, 2016
c4b5dd8
Fixed bug in invoker cli
midoblgsm Mar 4, 2016
efcc535
Merge branch 'master' of github.com:cloudfoundry-incubator/volman
Mar 7, 2016
1728582
Make fakedriver mountPath creation safe
Mar 8, 2016
c35dd71
Intial commit of web server plugin architecture
Mar 8, 2016
10f2510
Refactor driver spec file helpers methods
lwoydziak Mar 9, 2016
4f7819d
Add unit tests for coverage
lwoydziak Mar 10, 2016
f5ae545
volman can create and get volumes
cwlbraa Mar 15, 2016
71f3665
use os.ModePerm instead of magic 0777 in fakedriver
cwlbraa Mar 15, 2016
5f988e9
Updated the logging to comply with diego logging standards.
midoblgsm Mar 15, 2016
51a1f13
Added unix transport and Updated discovery mechanisms to include .soc…
lwoydziak Mar 18, 2016
bed345e
fix 1.6 incompatibilites.
lwoydziak Mar 22, 2016
62125d8
Add a test to ensure local volman doesn't break without a path
Mar 23, 2016
99a7393
Fixes unit test failures in CI
Mar 23, 2016
f886c3d
Improve test coverage in Driver discovery
lwoydziak Mar 25, 2016
fb58693
Update LICENSE
emalm Mar 25, 2016
cbecd06
Revert "Improve test coverage in Driver discovery"
luan Mar 25, 2016
c3ee2e0
Revert "Revert "Improve test coverage in Driver discovery""
wendorf Mar 25, 2016
8d96eeb
[#114704333] Add remove api to drivers
Mar 25, 2016
dea6225
Improve coverage for fakedriver
lwoydziak Mar 29, 2016
a38120f
Improved coverage for fakedriver
lwoydziak Mar 29, 2016
4d114b9
Parameterized the driver for the main_test to allow for other drivers to
lwoydziak Mar 29, 2016
b942cb0
Don't start the volman driver server, until it's listening
midoblgsm Mar 29, 2016
fe8ffcd
Externalized mountDir for easy testing
Mar 30, 2016
e193202
Wip: externalized opts,volumeName and driver from certification tests
Mar 30, 2016
88d213f
Correct Certification suite to handle parallel runs.
midoblgsm Mar 30, 2016
733e803
Correct Certification suite to handle parallel runs.
midoblgsm Mar 30, 2016
6247543
fixing fake driver local driver returned error message.
lwoydziak Mar 30, 2016
597c412
Fixed failing test.
lwoydziak Mar 30, 2016
0a4d186
Updated tests to use mountDir
Mar 30, 2016
ed133d9
Removing failing test.
Mar 31, 2016
8091f8d
added test that writes a file to the mountpoint
Mar 31, 2016
6951954
Make write test clean up after itself
Apr 1, 2016
8c1defe
[finishes #115266941] - Volume Drivers have an Unix Socket transport
lwoydziak Apr 4, 2016
011df43
quiet down local client list-drivers logging
cwlbraa Apr 5, 2016
44db9fe
Wrap spec writing with an interface
maximilien Apr 6, 2016
3b60677
Changed .go files permissions
midoblgsm Apr 6, 2016
fff45e6
Move fakedriver acceptance from cmd/volman to fakedriver/acceptance
lwoydziak Apr 6, 2016
9b9ba66
Reduce noise in logs by changing some log lines to Debug
nimakaviani Apr 6, 2016
5c8c797
Remove spec file writing from the certification suite (and add to fak…
lwoydziak Apr 6, 2016
13f6a02
Remove spec file writing from the certification suite (and add to fak…
lwoydziak Apr 6, 2016
3d60374
Fakedriver certified with json spec.
lwoydziak Apr 6, 2016
beec228
Match driver process shuitdown with it's invocation
Apr 7, 2016
90dc60c
wip
lwoydziak Apr 12, 2016
86710fb
WIP: changing to fixtures files
lwoydziak Apr 13, 2016
4fdfceb
WIP: passing one test at a time but not more
lwoydziak Apr 14, 2016
707df7c
Add background driver discovery
Apr 15, 2016
74c97c8
passing individually but not in parallel
midoblgsm Apr 15, 2016
06f3712
checkpoint
midoblgsm Apr 15, 2016
ddd8687
[#117458861] Working version of non-parallel execution.
midoblgsm Apr 16, 2016
5ada68c
checkpoint for certification refactoring
Apr 19, 2016
eb99276
Refactor ListDrivers implementation onto driver registry
Apr 19, 2016
f2df147
Added certification fixture.
Apr 19, 2016
e8ced09
merge wip to master
midoblgsm Apr 19, 2016
12571da
[#117458861](https://www.pivotaltracker.com/story/show/117458861)
Apr 19, 2016
0bd8c65
[#117458861](https://www.pivotaltracker.com/story/show/117458861)
midoblgsm Apr 19, 2016
f68cb5e
- Moved certification to github.com/cloudfoundry-incubator/volume_dri…
midoblgsm Apr 20, 2016
e18e684
Volume Drivers are activated the first time they are used
Apr 18, 2016
0577b9f
Refactor driver discovery so that driver registry is owned by
maximilien Apr 19, 2016
d0ed927
Remove mistakely added back file.
lwoydziak Apr 20, 2016
805a932
Add Intellij watchers definitions.
maximilien Apr 20, 2016
9115262
Update readme with intellij config
Apr 19, 2016
47978e4
Refactor driver routes to match docker's new routing API
maximilien Apr 21, 2016
866054f
Update README.md
Apr 21, 2016
861fe6a
Update activation to return array matching docker spec
maximilien Apr 21, 2016
87ca8d3
Refactored code:
Apr 26, 2016
37ef633
mergin with master
Apr 26, 2016
cb61b79
fixing errors in local client
midoblgsm Apr 26, 2016
3acb903
Implements exponential backoff/retry for all voldriver communication
Apr 26, 2016
d909578
Move system to gunk
lwoydziak Apr 27, 2016
21c5e04
Refactor LocalClient
Apr 26, 2016
edb0399
Add support for compound driver paths
Apr 27, 2016
e73c8da
Ensure backoff retries always use a new request
Apr 28, 2016
ef6b8f5
Update volman/cmd/volman to use new API
Apr 28, 2016
60eaf5f
Ensure all driver invocations use POST
Apr 28, 2016
02c68ff
Add /VolumeDriver.Path support
Apr 29, 2016
d003c8b
Fixed thread safety and unhandled errors in http handlers for volman …
midoblgsm May 2, 2016
3335675
Define List method for voldriver interface
May 2, 2016
d70dffa
Standardize on volmanDriverPaths
May 10, 2016
0fdf95e
Fix flaky backoff unit test
May 10, 2016
af06b23
take out the call to voldriver.Remove so that we no longer delete vol…
May 26, 2016
867cf31
add reference count logic to fakedriver so that we only unmount volum…
May 31, 2016
7a42841
added TLS support to fakedriver and volman
Jun 2, 2016
1e7d079
added metrics reporting for volman mounts
lwoydziak Jun 17, 2016
1c82241
move "fakedriver" out to localdriver repo
cwlbraa Jun 14, 2016
ce88aea
Add metrics and logging to volman(unmount)
lwoydziak Jun 20, 2016
5131fe5
Update and rename cf-debug-server -> debugserver
jfmyers9 Jun 28, 2016
a186ac4
Update and rename cf-lager -> cflager
nimakaviani Jun 28, 2016
c56699e
Update and rename cf_http -> cfhttp
nimakaviani Jun 28, 2016
3f8990e
Update/Rename runtime-schema -> runtimeschema
jfmyers9 Jun 28, 2016
07fb2a5
add basic process-level integration tests for volman's main
cwlbraa Jun 29, 2016
b15d629
move voldriver to its own repository
cwlbraa Jun 29, 2016
90048f6
Update import location of clock
luan Jun 30, 2016
5834e7a
Move clock to code.clock.org
luan Jun 30, 2016
ca0defb
fix bad merge
luan Jun 30, 2016
aedb3f1
Move lager to code.cloudfoundry.org
nimakaviani Jun 30, 2016
423218b
Remove unused fake
Jul 5, 2016
c64a64e
Add new check so that we only accept drivers that are reachable from …
Jul 21, 2016
fabb7bb
added test for unresponsive driver
Jul 21, 2016
9de90c8
volman passes inigo with non-responsive driver changes
Jul 22, 2016
bb66c9e
changed volman to use Activate instead of List during driver health c…
Jul 22, 2016
44eb2f2
remove driver registry activate tracking
Jul 26, 2016
82597bd
units passing with driver discovery moved into driver syncer
Jul 27, 2016
349b5c0
-remove unnecessary driver syncer fake generation
Jul 27, 2016
34d04e7
fix missing test for drivers that don't implement VolumeDriver
Jul 27, 2016
4c6ff0c
voldriver->code.cloudfoundry.org
Aug 1, 2016
b2b8bb4
volman -> code.cloudfoundry.org
Aug 2, 2016
0b270d3
localdriver -> code.cloudfoundry.org
Aug 2, 2016
6ca0adc
clean up README.MD for volman
Aug 5, 2016
0427d0f
move os, exec and http fakes from gunk to goshims
Sep 14, 2016
7b0577e
Volman removes mounts on startup
Oct 10, 2016
1f16718
Migrate to driverhttp.Env
lwoydziak Oct 12, 2016
0e7cdec
LICENSE and notice files for all persi repos
lwoydziak Oct 18, 2016
94837cc
more granular metrics for volman mounting and unmounting
Nov 1, 2016
bfb713f
update volume services google docs link to one that has more current …
Nov 9, 2016
a6afe86
update to use latest goshims submodule
Dec 22, 2016
9d27923
add warning for bad mount path
Jan 3, 2017
7a706db
reinitialize logger during tests
Jan 4, 2017
470aeba
reuse drivers that have already been created during driver discovery,…
Jan 23, 2017
cc854d9
additional logging messages
Jan 24, 2017
4e38d34
Create TROUBLESHOOTING.md
Feb 7, 2017
4f39fc5
Update TROUBLESHOOTING.md
Feb 7, 2017
153349c
Update TROUBLESHOOTING.md
Feb 16, 2017
b1620c3
Update TROUBLESHOOTING.md
Feb 16, 2017
a0b3002
Update TROUBLESHOOTING.md
Feb 16, 2017
a8bcf85
Update TROUBLESHOOTING.md
Feb 16, 2017
3b7db25
Update TROUBLESHOOTING.md
Feb 16, 2017
0816e26
clean up lager logging
Mar 3, 2017
398334c
add grootfs troubleshooting when app doesn't start
Mar 15, 2017
dce13fc
Added new metron client for sending metrics
Mar 22, 2017
e4c007f
remove unsafe logging from volman
Apr 3, 2017
8c99d61
Update import path to use go-loggregator
wfernandes Apr 11, 2017
f17453c
remove unused scripts, main.go, and remote client code from volman...…
Apr 26, 2017
3b8984d
fix volman units to reflect new golang 1.8 behavior for url.Parse
May 1, 2017
bde6d03
Revert "fix volman units to reflect new golang 1.8 behavior for url.P…
jfmyers9 May 5, 2017
49fd293
update import paths for go-loggregator client v2.0.0
bradylove May 15, 2017
3232b32
Merge remote-tracking branch 'origin/pr/2'
swetharepakula May 15, 2017
64f4d4e
Revert "Revert "fix volman units to reflect new golang 1.8 behavior f…
jvshahid May 23, 2017
3ee7830
update go-loggregator package
nimakaviani Jun 26, 2017
c1595cd
Update TROUBLESHOOTING.md
Jul 14, 2017
79e794f
Check whether the driver has been instantiated in driver syncer
Kaixiang Aug 4, 2017
2c135a6
Introduced new Plugin interface
Aug 7, 2017
581ae1c
Introduce VoldriverPlugin implementation of the Plugin interface
Kaixiang Aug 7, 2017
4140402
Remove unused fakePlugin from tests
Aug 7, 2017
b89e7f0
Ensure the driver_syncer always rediscovers and returns drivers even
Kaixiang Aug 7, 2017
885bccd
Rename DriverRegistry to PluginRegistry
Kaixiang Aug 8, 2017
2896233
Rename driver_registry.go -> plugin_registry.go
Aug 8, 2017
5ebb404
Rename DriverFactory -> DockerDriverFactory
Kaixiang Aug 8, 2017
00facf4
Rename DriverSyncer -> DockerDriverSyncer
Aug 8, 2017
bfba111
Move voldriver.Plugin interface to volman.Plugin
Kaixiang Aug 8, 2017
914489e
Move vollocal.PluginRegistry to volman.PluginRegistry
Kaixiang Aug 8, 2017
db55c61
Remove unrequired callled to getVoldriverReturns
Aug 8, 2017
e62a78a
Make the mount purger safe against non-voldriver plugins
Aug 11, 2017
0cfda0e
Move the syncer out of discoverer implementations
Kaixiang Aug 14, 2017
f0ac3ca
Improve logging
Kaixiang Aug 15, 2017
ae31e32
Add Mount API into plugin interface
Kaixiang Aug 17, 2017
2c238c1
add CsiMountRootDir in volman
Kaixiang Aug 18, 2017
f479585
extract the plugins discover process to a function
Kaixiang Aug 21, 2017
ca37ab6
Add unmount in plugin api and implement it in the plugins
Aug 21, 2017
d16d203
remove pluginid argument from plugin api
Kaixiang Aug 21, 2017
78c0795
Remove GetImplementation from plugin api
Aug 22, 2017
d1044e8
Use diego logging client in place of compatibility
bradylove Aug 21, 2017
c3cf907
Standardize signal receipt message.
Sep 12, 2017
ae530f3
get rid of useless dependencies
Sep 13, 2017
73bf70b
Move csi discoverer into volman to ease dependency management issues in
Sep 14, 2017
65592e7
Update TROUBLESHOOTING.md
Kaixiang Oct 5, 2017
7323983
Update SendDuration signature to include gauge options.
jvshahid Dec 12, 2017
794a196
update to v0.1.0 of the CSI spec [#152935389](https://www.pivotaltrac…
Jan 10, 2018
674f35f
update volman's csi discoverer to perform a strict version match agai…
Jan 22, 2018
f18cb0b
rename Csi to CSI to conform to Golang naming conventions
Jan 23, 2018
39f995a
move csiplugin repo into cloudfoundry org
Kaixiang Jan 26, 2018
21719a8
volman gets csi plugin identity from the csi identity service
Kaixiang Jan 29, 2018
23e56d3
use os.PathSeparator to support windows path
Kaixiang Feb 1, 2018
738728d
fix the regex for windows OS match
Feb 1, 2018
9091a48
Fix unix-specific path spec file creation
Kaixiang Feb 1, 2018
1044021
Don't run unit test for unix sock driver spec in windows
Feb 1, 2018
2e78926
retest driver connections during driver discovery to make sure we can…
Feb 2, 2018
ac5bb96
Update TROUBLESHOOTING.md
Feb 22, 2018
1488739
update to csi v0.2 for volman csiplugin
Kaixiang Mar 9, 2018
4d95797
Csi plugin now needs an oshelper when initialized
Kaixiang Apr 25, 2018
f2aa5ef
introduce a SafeError allowing volman to return printable errors
Kaixiang May 7, 2018
1c68b3c
introduce a SafeError allowing volman to return printable errors for …
May 7, 2018
b701f30
Moved docker discoverer in from voldriver
May 8, 2018
b9cb991
Make mapfsPath configurable for Csi plugin discoverer
May 23, 2018
bb06b98
Remove mapfs path from CSI plugin
davewalter Aug 9, 2018
be44867
Check for accessibility constraints when discovering CSI plugins
davewalter Aug 16, 2018
e0840bd
Updated Mount to support unique volume IDs
davewalter Sep 13, 2018
45fc977
Update unmount to support unique volume IDs
Sep 13, 2018
a9e0fb4
Fix issues with vollocal tests
davewalter Sep 17, 2018
08b3501
Use voldriver.utils to generate unique volume IDs
Sep 17, 2018
6759469
Update config type precedence
davewalter Sep 18, 2018
6addbff
Update for dockerdriver repo rename (ne voldriver)
davewalter Nov 1, 2018
12b8148
Regenerated fakes
davewalter Nov 1, 2018
b58a986
Bump to csi-1.0.0-rc2
Nov 14, 2018
6d1b8a7
Update TROUBLESHOOTING.md
Feb 12, 2019
7845711
Update README.md
Mar 27, 2019
30c2e12
Code refactor
DennisDenuto Jun 6, 2019
d7bc955
Backfill spec precedence ordering test
DennisDenuto Jun 7, 2019
93c71f9
Refactor plugin discovery internals
DennisDenuto Jun 7, 2019
cadcdb3
Refactor docker driver discovery implementation
DennisDenuto Jun 10, 2019
94f02a7
remove CSI support from Diego
DennisDenuto Aug 12, 2019
5f7a804
reformat
sunjayBhatia Oct 25, 2019
90388b3
Update README with URL to diego-release issues
mariash Jan 21, 2020
37dde56
Update PR template
mariash Jan 25, 2020
9e7f95a
content change
heyjcollins Jan 31, 2020
de20a3b
Update PULL_REQUEST_TEMPLATE.md
heyjcollins Jan 31, 2020
cf8a02b
Use correct import path
Jun 15, 2021
4129b31
Replace GinkgoParallelNode with GinkgoParallelProcess
mariash Jul 19, 2022
76091d5
Bump to ginkgo/v2 && lager/v3 (#5)
winkingturtle-vmw Apr 6, 2023
b60663c
Add CODEOWNERS file in preparation for branch protection rules (#6)
geofffranks Jun 12, 2023
64e5deb
Remove unnecessary assignments to the blank identifier
geofffranks Feb 27, 2024
0ccdead
Don't defer Close() before checking for errors
geofffranks Feb 28, 2024
e0b8fc9
Check errors before overwriting them with new errors
geofffranks Feb 28, 2024
001c439
Remove unused code
geofffranks Feb 29, 2024
05b1222
Stop using deprecated ioutil package
geofffranks Feb 29, 2024
bcd8266
Sync .github dir templates
tas-runtime-bot Apr 8, 2024
6a9a624
Update go-loggregator to v9 (#8)
Birdrock May 21, 2024
dccfdfb
Add overview docs for volume-services
winkingturtle-vmw Sep 6, 2024
5b0d282
add missing image
winkingturtle-vmw Sep 6, 2024
d3e7f15
remove deprecated option
winkingturtle-vmw Sep 6, 2024
dd00276
Catch or explicitly ignore unhandled errors (#10)
geofffranks Sep 30, 2024
64579f3
Sync README.md
tas-runtime-bot Oct 1, 2024
8579382
Sync README.md
tas-runtime-bot Oct 25, 2024
ced04dc
Sync README.md
tas-runtime-bot Oct 26, 2024
5806422
Sync README.md
tas-runtime-bot Oct 29, 2024
3b243c5
update link to remove redirect (#11)
geofffranks Nov 18, 2024
3458c24
Sync README.md
tas-runtime-bot Dec 10, 2024
b882160
remove volman submodule entry
kart2bc Aug 26, 2025
23d9039
Add 'src/code.cloudfoundry.org/volman/' from commit '3458c241e8fe92a3…
kart2bc Aug 26, 2025
7275671
Inline submodule volman into main repo
kart2bc Aug 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@
path = src/code.cloudfoundry.org/cfdot
url = https://github.com/cloudfoundry/cfdot
branch = main
[submodule "src/code.cloudfoundry.org/volman"]
path = src/code.cloudfoundry.org/volman
url = https://github.com/cloudfoundry/volman
branch = main
[submodule "src/code.cloudfoundry.org/localdriver"]
path = src/code.cloudfoundry.org/localdriver
url = https://github.com/cloudfoundry/localdriver
Expand Down
1 change: 0 additions & 1 deletion src/code.cloudfoundry.org/volman
Submodule volman deleted from 3458c2
4 changes: 4 additions & 0 deletions src/code.cloudfoundry.org/volman/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pkg
bin
*coverprofile
.DS_Store
63 changes: 63 additions & 0 deletions src/code.cloudfoundry.org/volman/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Troubleshooting Problems with Cloud Foundry Volume Services

## When the application does not start

- If you have pushed an app with `--no-start` and then bound the app to a service, the cf cli will tell you to `cf restage` to start the app with the new binding. This is incorrect. You must use `cf start` on an app that is not running. It the app is already running, then `cf restage` is OK.
- If your application still won't start, try unbinding it from the volume service and see if it starts when it is *not* bound. (Most of our test applications like [pora](https://github.com/cloudfoundry-incubator/persi-acceptance-tests/tree/master/assets/pora) and [kitty](https://github.com/EMC-Dojo/Kitty) will start up even when no volume is available.)
If the application starts up, then that indicates the problem is volume services related. If you still see the same error regardless, then that indicates that the problem is elsewhere, and you should go through the [Troubleshooting Application Deployment and Health](https://docs.cloudfoundry.org/devguide/deploy-apps/troubleshoot-app-health.html) steps.
- Simple errors may turn up in the application logs. Try `cf logs <app name>`. Even if there are no errors in evidence, make a note of the application guid in this log--it could be useful later.
- If you're specifying a `mount` in your bind configuration that overlaps with the application directory, you may encounter errors or odd behaviors at application startup because the mounts are established before the application droplet is unpacked into the container. As a result, diego will attempt to unpack the app droplet into your mounted directory, and will fail if it cannot. If you require the mounted directory to be available within your application directory tree, the preferred approach is to mount it elsewhere, and then create a symlink to it in your application's start script.
- More detailed logging is available by restarting your app with `CF_TRACE`. To do this, type
```bash
CF_TRACE=true cf restart <app name>
```
- If you see mount errors in the cf application logs when using the NFS volume service, it is possible that your NFS share is not opened to the Diego cells, or that the network access between the cell and the NFS server is not open. To test this, you will need to SSH onto the cell. See the steps below about failing broker/driver deployment for some information about how to bosh ssh into the cell. Once you are ssh'd into the cell, type the following command to test NFS access:
```bash
mkdir foo
sudo mount -t nfs -o vers=3 <nfs server>:<nfs share>
sudo umount foo
sudo mount -t nfs -o vers=4 <nfs server>:<nfs share>
sudo umount foo
```
If the network is open, one or both of these commands should successfully mount. If neither works, check to make sure that your share is opened to the Diego cell IPs. If only one of the mount commands succeeds, that suggests that the share is only open to NFS3 or NFS4 connections, and you will need to specify that version in your service configuration.
You can employ a similar set of steps to dignose failures with SMB mounts, which may also need to be opened to Diego cell IPs.
- If you don't find any mount error, and your mount takes longer than 10s. It is possible that volman has canceled the connection to the volume driver which can't mount your NFS share in 10s. Check the network latency between your NFS share and Diego cells and DNS resolve speed.
- If you get this far, then you will need to consult the BOSH logs while restaging your application to see if you can find an error there (assuming that you have bosh access). See the steps below about failing broker/driver deployment for some information about how to bosh ssh into the cell. Once you are ssh'd into the cell, check the driver stderr/stdout logs. It is also useful to look at the `rep` logs as some errors in the volume services infrastructure will end up there.
- If you don't see any errors on the Diego cell, it is likely that your error occurred in the cloud controller, before the could be placed on a cell. To find the cloud controller logs related to your application, you can `bosh ssh` into the `api` vm in your cloudfoundry deployment. `grep` for your application guid in the `cloud_controller_ng` logs. Sometimes it is helpful to pipe the results of that `grep` to also grep for `error`:
```bash
grep <app guid> cloud_controller_ng.log | grep error
```

## When the application starts, but data is missing

If your application starts up, but it cannot find the data you expected in your share, it is possible that there is an issue with volume services--the volume will be mounted onto the diego cell, and then bind-mounted from the diego cell into the application container by garden. Failures in either of those mounts that go undetected by the infrastructure could theoretically leave an empty directory in place of the volume mount, which could result in the appearance of an empty mount.
However, it's a good idea to take a look on your application container to make sure that your volume mount is really placed where you expected it:
- `cf ssh <app name>` to enter the application container
- `echo $VCAP_SERVICES` to dump out the environment passed into the container by cloudfoundry. In that data block you should see an entry called either `container_path` or `container_dir` (depending on your cloudfoundry version). That will contain the path where your volume is mounted.
- `cd` to the path above, and validate that it contains the data you expected and/or that you can create files in that location.
- to double check that volume services are really working, you can bind a second app to the same service and `cf ssh` into that application. If volume services are operational, data written in one application container will be in the share when you ssh into the other.

If your application requires data to be mounted in a specific location, you can normally alter the mount path when you bind your application to the volume by using the `-c` flag as follows;
```bash
cf bind-service <app name> <service name> -c '{"mount":"/path/in/container"}'
```
This mount configuration is supported by all of the volume service brokers in the `cloudfoundry-incubator` and `cloudfoundry` github orgs.

## When BOSH deployment fails

### Broker deployment (for bosh deployed brokers)

When broker deployment fails, assuming that Bosh has successfully parsed the manifest and created a vm for your broker, you will normally find any errors that occurred during startup by looking in the bosh logs.
Although you can gather the logs from your bosh vm using the `bosh logs` command, that command creates a big zip file with all the logs in it that muust be unpacked, so it is usually easier and faster to `bosh ssh` onto the vm and look at the logs in a shell.
Instructions for bosh ssh are [here](https://bosh.io/docs/sysadmin-commands.html#ssh).

Once you are ssh'd into the vm, switch to root with `sudo su` and then type `monit summary` to make sure that your broker job is really not running.
Assuming that the broker is not showing as running, you should see some type of error in one of three places:
- `/var/vcap/sys/log/monit/` contains monit script output for the various bosh logs. Errors that occur in outer monit scripts will appear here.
- `/var/vcap/sys/log/packages/<broker name>` contains package installation logs for your broker source. Some packaging errors end up here
- `/var/vcap/sys/log/jobs/<broker name>` contains logs for your actual broker process. Any errors from the running executable or pre-start script will appear in this directory.

### Driver deployment

Diagnosing failures in driver deployment is quite similar to bosh deployed broker diagnosis as described above. The principal difference is that the driver is deployed alongside diego, so you must ssh into the diego-cell VM to find the driver job.
In a multi-cell deployment, sometimes it is necessary to try different cell vms to find the failed one, but most of the time if configuration is not right, all cells will fail in the same way.
11 changes: 11 additions & 0 deletions src/code.cloudfoundry.org/volman/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package volman

import "code.cloudfoundry.org/lager/v3"

//go:generate counterfeiter -o volmanfakes/fake_manager_client.go . Manager

type Manager interface {
ListDrivers(logger lager.Logger) (ListDriversResponse, error)
Mount(logger lager.Logger, driverId string, volumeId string, containerId string, config map[string]interface{}) (MountResponse, error)
Unmount(logger lager.Logger, driverId string, volumeId string, containerId string) error
}
79 changes: 79 additions & 0 deletions src/code.cloudfoundry.org/volman/docs/01-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
title: Overview
expires_at: never
tags: [volman,diego-release,volume-services]
---

# Overview

Volume services as a product is shipped as part of OSS Cloud Foundry

OSS cloud foundry: OSS Users can choose to install volume-services on their deployment by enabling the deployment of the driver using the ops file, and running the errand to install the broker. The two volume services brokers shipped as part of cf-deployment are nfs broker and smb broker

Application developers consume volume services via the cf services interface.

# Architecture

![volume-services-arch.png](./assets/volume-services-arch.png "Volume Services Architecture")

## Key concepts:

- Service Broker: OSBAPI compliant broker which enables the application developers to list and provision services them selfs.
- Volume Mounts: When a Service Broker binds an application to a service, it can now include an array of volume_mounts, which describe where and how to mount the filesystem in the container.
- Volume Drivers: Volume Drivers are 3rd party plugins which manage the lifecycle of creating, mounting, unmounting, and destroying a Volume Service instance. They are deployed on the Diego cell. More details here

Each volume services deployment contains one service broker component deployed as a CF app, and one driver component deployed as a BOSH release with the Diego cell.

## High level workflow

```mermaid
sequenceDiagram
participant CLI as cf-cli
participant CC as Cloud Controller
participant B as Volume Service Broker
participant D as Diego Cell
participant A as Application
CLI->>CC: cf create-service/ cf bind-service
CC->>B: OSBAPI create service / OSBAPI bind service
B->>CC: volume_mounts
CLI->>CC: cf restart app
CC->>D: deploy app with volume_mounts config
D->>A: Mount storage
D->>A: Start App
```

When a Service Broker binds an application to a service, it can now include an array of volume_mounts, which describe where and how to mount the filesystem in the container.

Before a container starts, the storage device is attached and mounted on the Cell by a trusted component – the Volume Driver – and then bind-mounted into the untrusted container by Garden. This allows storage setup to occur without needing any privilege escalation inside of the container.

## Diego Cell Workflow
This section documents the workflow of what happens internally when the cloud controller asks diego to start an app with a volume attached to it.

```mermaid
sequenceDiagram
participant bbs as Diego-BBS
participant rep as Diego-Rep
participant vm as VolMan
participant nfs as NFS Driver
participant garden as Garden
bbs->>rep: Run app on the cell
Note right of rep: Detect app has a binding with a volume
rep->>vm: provision volume from binding
vm->>nfs: provision volume
nfs->>nfs: mounts the remote share
nfs->>vm: local mount point
vm->>rep: local mount point
rep->>garden: Run app container with the directory mounted
```

## Volume Drivers

Volume Drivers are 3rd party plugins which manage the lifecycle of creating, mounting, unmounting, and destroying a Volume Service instance. Currently, Volume Drivers written against the Docker v1.12 Volume Plugin specification are supported.

Docker Volume Plugin Docs: [https://docs.docker.com/engine/extend/plugins_volume/](https://docs.docker.com/engine/extend/plugins_volume/)

Drivers are deployed onto Diego Cells in one of two ways. Either they are deployed as colocated jobs, or they are deployed as job-specific add-ons.

Known implementations:
- [NFS](https://github.com/cloudfoundry/nfs-volume-release): Support for pre-existing NFS shares is available through the nfs-volume-release. This release allows application developers to provision new service instances corresponding to existing nfs shares, provided that the NFS server is configured to allow connections from the Diego cell VMs in the Cloud Foundry deployment. During application bind, the application developer can specify a UID and GID to be used when connecting to the NFS server.
- [SMB Volume](https://github.com/cloudfoundry/smb-volume-release): A driver and broker that mounts SMB shares.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
71 changes: 71 additions & 0 deletions src/code.cloudfoundry.org/volman/resources.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
package volman

import (
"code.cloudfoundry.org/lager/v3"
)

//go:generate counterfeiter -o volmanfakes/fake_plugin.go . Plugin
type Plugin interface {
ListVolumes(logger lager.Logger) ([]string, error)
Mount(logger lager.Logger, volumeId string, config map[string]interface{}) (MountResponse, error)
Unmount(logger lager.Logger, volumeId string) error
Matches(lager.Logger, PluginSpec) bool
GetPluginSpec() PluginSpec
}

//go:generate counterfeiter -o volmanfakes/fake_discoverer.go . Discoverer
type Discoverer interface {
Discover(logger lager.Logger) (map[string]Plugin, error)
}

type ListDriversResponse struct {
Drivers []InfoResponse `json:"drivers"`
}

type MountRequest struct {
DriverId string `json:"driverId"`
VolumeId string `json:"volumeId"`
Config map[string]interface{} `json:"config"`
}

type MountResponse struct {
Path string `json:"path"`
}

type InfoResponse struct {
Name string `json:"name"`
}

type UnmountRequest struct {
DriverId string `json:"driverId"`
VolumeId string `json:"volumeId"`
}

type PluginSpec struct {
Name string `json:"Name"`
Address string `json:"Addr"`
TLSConfig *TLSConfig `json:"TLSConfig"`
UniqueVolumeIds bool
}

type TLSConfig struct {
InsecureSkipVerify bool `json:"InsecureSkipVerify"`
CAFile string `json:"CAFile"`
CertFile string `json:"CertFile"`
KeyFile string `json:"KeyFile"`
}

type PluginRegistry interface {
Plugin(id string) (Plugin, bool)
Plugins() map[string]Plugin
Set(plugins map[string]Plugin)
Keys() []string
}

type SafeError struct {
SafeDescription string `json:"SafeDescription"`
}

func (s SafeError) Error() string {
return s.SafeDescription
}
Loading