Comments (11)
In managed plugin, glusterfs should be 3.13 https://packages.debian.org/fr/testing/glusterfs-client.
But, I use the glusterfs command and not mount (https://github.com/sapk/docker-volume-gluster/blob/master/gluster/driver/driver.go#L44).
This allow for multiple server as base and I don't know if it support that "new" format.
In the docs (https://docs.gluster.org/en/latest/release-notes/3.12.0/), they only with mount command.
from docker-volume-gluster.
That shouldn't be too hard to do. It maybe possible to add the subdir inside voluri and keep backward compat.
from docker-volume-gluster.
You need to have GlusterFS 3.12 at minimum for this to work. I think you may be using an older version of GlusterFS which is causing it to fail on my set up.
from docker-volume-gluster.
@trajano this is not implemented yet. I was just talking about a way to implement it.
from docker-volume-gluster.
I think if you just use Gluster 3.12 or assume Gluster 3.12 is installed (I don't think you make any assumption on what is installed though because I see the volume mounted even without the glusterfs client installed by yum) then you can simply pass in
store:/myvol/subvol
from docker-volume-gluster.
The parseVolUri needs to add --subdir-mount=SUBDIR-PATH
from docker-volume-gluster.
I tried to make it but I don't know Go well enough here's my cut
const (
validHostnameRegex = `(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])`
validMountRegex = `\/?([^\/]+)(/[^\/]+)?`
)
func isValidURI(volURI string) bool {
re := regexp.MustCompile(validHostnameRegex + ":" + validMountRegex)
return re.MatchString(volURI)
}
func parseVolURI(volURI string) string {
volParts := strings.Split(volURI, ":")
volServers := strings.Split(volParts[0], ",")
re := regexp.MustCompile(validMountRegex)
??? := re.MatchString(volParts[1])
volumeIdPart := ???.group(1)
subDirectoryPart := ???.group(2)
if (subDirectoryPart == nil) {
return fmt.Sprintf("--volfile-id='%s' -s '%s'", volumeIdPart, strings.Join(volServers, "' -s '"))
} else {
return fmt.Sprintf("--volfile-id='%s' --subdir-mount='%s' -s '%s'", volumeIdPart, subDirectoryPart, strings.Join(volServers, "' -s '"))
}
}
from docker-volume-gluster.
I will have a look at it tommorrow.
If you want to contribute you can submit a PR with tests that should validate the change. https://github.com/sapk/docker-volume-gluster/blob/master/gluster/driver/tools_test.go
This would be a easy start at go. It is mostly adding new case to check to the two first functions.
from docker-volume-gluster.
Great job guys :)
from docker-volume-gluster.
Doing more tests but should release soon.
from docker-volume-gluster.
@sapk Has this feature made it into any of the releases yet? I am still having issues with gluster 5.3
from docker-volume-gluster.
Related Issues (20)
- mount gluster volume in docker service HOT 2
- VolumeDriver.Mount: exit status 1 HOT 2
- VolumeDriver.Mount: exit status 1 HOT 12
- And more context to exit status 1 errors. HOT 1
- simple getting started guide HOT 7
- I am unable to remove the volume even with -f HOT 6
- VolumeDriver.Mount: exit status 107 HOT 21
- docker volume rm fails on an unmounted volume HOT 7
- Cannot "docker volume rm" volumes created with sapk/docker-volume-gluster HOT 3
- Any reason why 'old' branch is set to default? HOT 4
- Add support for glusterd2
- Create a swarm env for tests
- Add option to disable persistence
- Verify gluster version
- raspberry pi build HOT 11
- mounting sub dirs
- docker: Error response from daemon: VolumeDriver.Mount: EOF. HOT 2
- containers/create HOT 13
- Is it supposed to automatically create the specified subdir?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-volume-gluster.