Code Monkey home page Code Monkey logo

Comments (12)

sapk avatar sapk commented on May 18, 2024 1

@badele That normal, the plugin does have to resolve nodename of volume (node-1, node-2, node-...) but those names are only resolved by docker inside the same network.

I can recommend you to replace nodename by there respectives IP at volume creation. gluster volume create dockerstore replica 3 IP-node-1:/data/glusterfs/store/dockerstore IP-node-2:/data/glusterfs/store/dockerstore IP-node-3:/data/glusterfs/store/dockerstore (Note: you can keep nodename for peer probe)

This is how gluster works when you mount it, the client will retrieve the configuration (node-1:/data/glusterfs/store/dockerstore node-2:/data/glusterfs/store/dockerstore ...) but gluster can't outside the docker network (on host or in plugin container) resolve those names. A other solution is to add node-X container ip to host file /etc/hosts to resolve those names.

If you want, I setup the same type of configuration for integration testing. Just clone the repo and do
make test-integration (code here : https://github.com/sapk/docker-volume-gluster/tree/master/gluster/integration)

from docker-volume-gluster.

badele avatar badele commented on May 18, 2024 1

It's work fine for me, @sapk Thanks for your help :)

from docker-volume-gluster.

badele avatar badele commented on May 18, 2024 1

I complete my previous message with the sample code (only work if we use host containers IPs)

Edit: I use @sapk tips for getting IPs

from docker-volume-gluster.

sapk avatar sapk commented on May 18, 2024 1

@badele I can recommend you to use docker inspect --format {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}} containerName to get the container IP more reliably.

from docker-volume-gluster.

sapk avatar sapk commented on May 18, 2024

Does the host have fuse intalled ?

from docker-volume-gluster.

cron410 avatar cron410 commented on May 18, 2024
[rancher@rancher ~]$ ls /dev/fuse
/dev/fuse

I have an rclone container that is able to use /dev/fuse to mount a cloud storage drive.

from docker-volume-gluster.

sapk avatar sapk commented on May 18, 2024

Can you debug the plugin to read the gluster client logs https://docs.docker.com/engine/extend/#debugging-plugins ?
In most case, it should be the host that doesn't resolve one of the name of the gluster hosts.

from docker-volume-gluster.

badele avatar badele commented on May 18, 2024

Hi,

I have a same issue,

I try test you plugin with this docker recipe

Note: the glusterfs cluster it seem work with this recipe

I use a archlinux host, and it seem not log for the docker plugin or i dont't know activate the docker plugin debug/verbose mode (I have actived with docker plugin set sapk/plugin-gluster DEBUG=1 command).

Thank for you help

from docker-volume-gluster.

badele avatar badele commented on May 18, 2024

What an idiot ! i have forgot of replace the hostname by ip for volume creation :)

I think you're right, i will test this this evening

Thank for you help and good job for you project

from docker-volume-gluster.

sapk avatar sapk commented on May 18, 2024

I did the same ^^ :

log.Print(cmd("docker-compose", "-f", pwd+"/docker/gluster-cluster/docker-compose.yml", "exec", "-T", "node-1", "gluster", "volume", "create", "test-replica", "replica", "3", "node-1:/brick/replica", "node-2:/brick/replica", "node-3:/brick/replica"))
We always learn from our mistake ;-)

from docker-volume-gluster.

cron410 avatar cron410 commented on May 18, 2024

from docker-volume-gluster.

sapk avatar sapk commented on May 18, 2024

If the host can resolve the domains of gluster server it is good.
In the case of @badele it is the container name that he use for gluster server name in volume but those only resolve inside the corresponding docker network.

from docker-volume-gluster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.