ceph-container: Deploy Rados Gateway failed
1. Delete containers and directory
sudo docker rm -f ceph-monitor ceph-osd ceph-mds ceph-gateway
sudo rm -rf /etc/ceph
sudo rm -rf /var/lib/ceph
2. Run Ceph monitor witin container
sudo docker run -d \
--net=host \
-v /etc/ceph:/etc/ceph \
-v /var/lib/ceph/:/var/lib/ceph/ \
-e MON_IP=192.168.59.1 \
-e CEPH_PUBLIC_NETWORK=192.168.59.0/24 \
--name=ceph-monitor \
ceph/daemon mon
2. Run Ceph osd witin container
sudo mkdir /var/lib/ceph/osd
sudo docker run -d \
--net=host \
--pid=host \
--privileged=true \
-v /etc/ceph:/etc/ceph \
-v /var/lib/ceph/:/var/lib/ceph/ \
-v /dev/:/dev/ \
-e OSD_DEVICE=/dev/vdd \
-e OSD_TYPE=directory \
--name=ceph-osd \
ceph/daemon osd
Check Ceph status
sudo docker exec -it ceph-monitor ceph -s
cluster 6d05d9fa-2635-4f09-b544-5a5b12706905
health HEALTH_WARN
64 pgs stuck inactive
64 pgs stuck unclean
monmap e1: 1 mons at {macubuntu1=192.168.59.1:6789/0}
election epoch 2, quorum 0 macubuntu1
osdmap e5: 1 osds: 1 up, 1 in
flags sortbitwise
pgmap v6: 64 pgs, 1 pools, 0 bytes data, 0 objects
0 kB used, 0 kB / 0 kB avail
64 creating
3. Run Ceph mds witin container
sudo docker run -d \
--net=host \
-v /var/lib/ceph/:/var/lib/ceph/ \
-v /etc/ceph:/etc/ceph \
-e CEPHFS_CREATE=1 \
--name=ceph-mds \
ceph/daemon mds
4. Run Ceph gateway witin container
sudo docker run -d \
--net=host \
-v /var/lib/ceph/:/var/lib/ceph/ \
-v /etc/ceph:/etc/ceph \
--name=ceph-gateway \
ceph/daemon rgw
create ceph user failed without output
sudo docker exec ceph-gateway radosgw-admin -n client.rgw.$(hostname) -k /var/lib/ceph/radosgw/$(hostname)/keyring user create --uid="kiwenlau" --display-name="kiwenlau"
the ceph gatawaty container exited after 5 minutes:
docker logs ceph-gateway
static: does not generate config
HEALTH_WARN 80 pgs degraded; 80 pgs stuck inactive; 80 pgs stuck unclean; 80 pgs undersized
2016-05-26 08:41:54.813320 7f54b1f567c0 0 set uid:gid to 64045:64045
2016-05-26 08:41:54.813405 7f54b1f567c0 0 ceph version 9.2.1 (752b6a3020c3de74e07d2a8b4c5e48dab5a6b6fd), process radosgw, pid 75
2016-05-26 08:41:54.818179 7f54b1f567c0 0 couldn't find old data placement pools config, setting up new ones for the zone
2016-05-26 08:46:54.813600 7f54a71a2700 -1 Initialization timeout, failed to initialize
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (8 by maintainers)
@leseb More info:
Steps I have done:
docker run -d --net=host -v /etc/ceph:/etc/ceph -e MON_IP=10.23.174.157 -e CEPH_PUBLIC_NETWORK=10.23.174.157 --name=ceph ceph:demo
sudo yum install ceph-common ceph-radosgw
sudo ceph auth del client.radosgw.gateway
sudo ceph auth get-or-create client.radosgw.gateway osd 'allow rwx' mon 'allow rwx' -o /etc/ceph/ceph.client.radosgw.keyring
sudo /etc/init.d/ceph-radosgw start
--> I got init timeout here.My ceph.conf:
~
/etc/httpd/conf.d/raw.conf
@kiwenlau this is normal since you only have a single OSD. Please issue the following commands on the monitor:
ceph osd dump| grep size
ceph osd pool set <pool> size 1
This should fix your issues.