GithubHelp home page GithubHelp logo

Comments (17)

tobegit3hub avatar tobegit3hub commented on July 17, 2024 3

Oh, it's the problem of ceph configuration in my localhost. It didn't update the ceph.conf when I try to pass another MON_IP or CEPH_NETWORK. This's not a issue but takes time to find out the problem. Maybe we should not use -v /etc/ceph:/etc/ceph and rely on nothing from the host.

Thanks for all your help and the image works well every time 😃

from ceph-container.

Ulexus avatar Ulexus commented on July 17, 2024

I'll let @leseb handle any further details, but the problem you're running into is that you're running with --net=host, meaning Docker will run the container in the host's network instead of the Docker network. However, you are referencing IP addresses (MON_IP, for instance) in the Docker network.

You need to choose one or the other, not both.

from ceph-container.

leseb avatar leseb commented on July 17, 2024

@Ulexus comment is correct, you should chose the IP address of the host running Docker since you use --net=host.

from ceph-container.

tobegit3hub avatar tobegit3hub commented on July 17, 2024

I was following the command in README.md. If I just use --net=host, I got another error.

➜  demo git:(master) sudo docker run -d --net=host -v /etc/ceph:/etc/ceph ceph/demo                                                                                                                                 
5697fd7af0cc426d7b2cf1b59be5b63f43058f1e0ae776d394444be0661ea69f
➜  demo git:(master) sudo docker logs 5697fd7af0cc426d7b2cf1b59be5b63f43058f1e0ae776d394444be0661ea69f
ERROR- CEPH_NETWORK must be defined as the name of the network for the OSDs

Please tell us the correct way to launch ceph/demo container and how can we configure it.

from ceph-container.

leseb avatar leseb commented on July 17, 2024

Get the IP address of your machine running Docker. Then use this IP in the MON_IP variable. Then do the same for CEPH_NETWORK by using the CIDR of the host.

from ceph-container.

tobegit3hub avatar tobegit3hub commented on July 17, 2024

Hi @leseb . Please checkout my error log. It fails and said "unable to find any IP address in networks: 192.168.0.0/24". However, I passed "172.16.0.0/24" when I ran the container.

➜  ~  sudo docker run -d --net=host -v /etc/ceph:/etc/ceph -e MON_IP=172.16.0.206 -e CEPH_NETWORK=172.16.0.0/24 ceph/demo
392dddf8a5c2b926e0551e0d71a98b7f9afaabcd4fbd9f3eb7678953adaebb0b
➜  ~  sudo docker logs -f 392dddf8a5c2b926e0551e0d71a98b7f9afaabcd4fbd9f3eb7678953adaebb0b                               
creating /tmp/ceph.mon.keyring
importing contents of /etc/ceph/ceph.client.admin.keyring into /tmp/ceph.mon.keyring
importing contents of /etc/ceph/ceph.mon.keyring into /tmp/ceph.mon.keyring
2015-05-25 09:10:19.809116 7f23106208c0 -1 unable to find any IP address in networks: 192.168.0.0/24

It seems the script doesn't accept the environment variable to run the ceph processes.

from ceph-container.

leseb avatar leseb commented on July 17, 2024

Great!

from ceph-container.

tobegit3hub avatar tobegit3hub commented on July 17, 2024

I have tested to run demo container without -v /etc/ceph:/etc/ceph and it worked. How about removing this parameter in README and just tell us we can do it to pass the configuration files.

from ceph-container.

leseb avatar leseb commented on July 17, 2024

I think we should keep the -v option as it is maybe we should include a warning in the README.
Do you want to push this PR? :)

from ceph-container.

tobegit3hub avatar tobegit3hub commented on July 17, 2024

It's a minor change. You can add it by the way. And thanks for all your work 👍

from ceph-container.

steffenmllr avatar steffenmllr commented on July 17, 2024

Trying to get this to work within boo2docker on osx but it doesn't seem to work:

docker run -d -e MON_IP=$(boot2docker ip 2>/dev/null) -e CEPH_NETWORK=172.17.42.1/24 ceph/demo

which results in 2015-07-20 21:21:44.936721 7fd6194e48c0 -1 unable to find any IP address in networks: 172.17.42.1/24

What exactly do I need to pass into the CEPH_NETWORK the IP of the docker network bridge ?

from ceph-container.

tobegit3hub avatar tobegit3hub commented on July 17, 2024

Hi @steffenmllr , it's the CIDR of your IP. If your boot2docker ip is 172.17.42.1, then use CEPH_NETWORK=172.17.42.0/24. Make sure the last number is 0 and it should work.

from ceph-container.

steffenmllr avatar steffenmllr commented on July 17, 2024

thanks for the hint @tobegit3hub, but that somehow doesn't work for me:

$ boot2docker ip                                                                                                                                       
192.168.59.103

$ docker run -d -e MON_IP=192.168.59.103 -e CEPH_NETWORK=192.168.59.0/24 ceph/demo                                                                       
0d95d75d7a5ecfce52483c95f8e27f01c6b4e4b98801c599fe5a1fe6c57f2047

$ docker logs 0d95d75d7a5ecfce52483c95f8e27f01c6b4e4b98801c599fe5a1fe6c57f2047                                                                           creating /etc/ceph/ceph.client.admin.keyring
creating /etc/ceph/ceph.mon.keyring
monmaptool: monmap file /etc/ceph/monmap
monmaptool: set fsid to 22460643-77d3-4d4f-8359-3ac566497ff5
monmaptool: writing epoch 0 to /etc/ceph/monmap (1 monitors)
creating /tmp/ceph.mon.keyring
importing contents of /etc/ceph/ceph.client.admin.keyring into /tmp/ceph.mon.keyring
importing contents of /etc/ceph/ceph.mon.keyring into /tmp/ceph.mon.keyring
2015-07-20 23:07:52.330215 7fcf3de2d8c0 -1 unable to find any IP address in networks: 192.168.59.0/24

from ceph-container.

leseb avatar leseb commented on July 17, 2024

@steffenmllr please look at the README for ceph/demo. You have to use --net=host to work.
So this will give you:

$ docker run -d --net=host -v /var/lib/ceph:/var/lib/ceph -v /etc/ceph:/etc/ceph -e MON_IP=192.168.59.103 -e CEPH_NETWORK=192.168.59.0/24 ceph/demo

from ceph-container.

musha68k avatar musha68k commented on July 17, 2024

👍 thanks @leseb I'm on OSX like @steffenmllr and ran into the same issues - the part of MON_IP pointing to the IP address of your docker-machine / boot2docker just booted my container successfully.

from ceph-container.

hrchu avatar hrchu commented on July 17, 2024

The -v option is still a problem today :(

from ceph-container.

zealotous avatar zealotous commented on July 17, 2024

@hrchu, take a look at #496 there are the solution.

from ceph-container.

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.