This repository has been archived by the owner on Nov 9, 2020. It is now read-only.
Fix for vmdk-ops service unable to identify the newly mounted datasto… #714
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently vmdk-ops service is unable to identify a newly created datastore once it is up and running and after the first docker volume command is executed. Fix for #660
vmdk-ops service caches the list of datastores accessible after the first docker volume command is executed.
If the datastore is created before the first docker volume command is executed, the vmdk-ops service will identify the datastore since the list of accessible datastores are not cached till now.
Now after the first docker volume command is executed, the accessible datastores are not updated at all the vmdk-ops service. So the fix was update the cache of list of datastores when it couldn't find that datastore in its own cache.
Test steps:
Run any docker volume command. This will cache the list of datastores.
docker volume create -d=vmdk --name=testVol
Create an NFS datastore on ESX host.
esxcli storage nfs add --host=10.162.210.32 --share=/dbc/pa-dbc1132/bdontu/NFS2 --volume-name=nfsstore-bdontu2
docker volume create -d=vmdk --name=testVol2@nfsstore-bdontu2.
The above command successfully creates the volume "testVol2" on "nfsstore-bdontu2 datastore".
Without this fix, the vmdk-ops service complains that the datastore is not accessible.