Comments (17)
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.
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.
@Ulexus comment is correct, you should chose the IP address of the host running Docker since you use --net=host
.
from ceph-container.
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.
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.
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.
Great!
from ceph-container.
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.
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.
It's a minor change. You can add it by the way. And thanks for all your work 👍
from ceph-container.
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.
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.
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.
@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.
👍 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.
The -v option is still a problem today :(
from ceph-container.
@hrchu, take a look at #496 there are the solution.
from ceph-container.
Related Issues (20)
- /opt/ceph-container/bin/osd_disk_prepare.sh: line 46: ceph-disk: command not found HOT 7
- Need fix for CVE-2022-21797 HOT 4
- Bootstrap process hangs up for hours HOT 2
- not found /var/lib/ceph/osd/ceph-2//keyring HOT 2
- dnf update in ceph v18 container image is failing HOT 2
- RocksDBStore - cannot set permissions: Operation not permitted HOT 2
- /usr/bin/ceph: stderr Error EIO: Module 'cephadm' has experienced an error and cannot handle commands: ContainerInspectInfo HOT 2
- add ceph-mgr-callhome to IBM downstream container HOT 2
- cephadm has failed ContainerInspectInfo HOT 2
- populate_kvstore error HOT 1
- rename and repurpose this repository HOT 19
- reef builds don't work HOT 12
- Question about osd directory HOT 2
- docker-compose setup dose not run as expected mds and osd HOT 3
- With new quay.io/ceph/ceph:v16 image, ceph-csi meet segfault error HOT 2
- ceph/demo container does not expose mon port 3300 HOT 2
- Instructions for getting the zabbix template to work with rook-ceph HOT 2
- smartctl could not scrape metrics from HPE Smart Array in HBA mode HOT 2
- support VERSION=8 for contrib/compose-rhcs.sh
- Include cephfs-shell HOT 7
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 ceph-container.