Project

General

Profile

Actions

Support #36588

closed

Cannot build docker image with pre-configured OSD, MON, MGR and Radosgw

Added by Pavel Georgiev over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Tags:
Reviewed:
Affected Versions:
Pull request ID:

Description

Hi,

I'm trying to build a docker image based on the official ceph luminous image that initializes one mon, one osd, one mgr and one radosgw. The setup procedure for creating all this is performed using a shell script executed during the custom image build (it also creates custon realm, zonegroup, zone, rados user and 2 buckets).

The problem I'm facing is that when i start the container from the custom image my radosgw does not start.

cluster:
id: 0e5c989c-f22e-4eea-af24-fa783400126f
health: HEALTH_OK
services:
mon: 1 daemons, quorum 0
mgr: x(active)
osd: 1 osds: 1 up, 1 in
data:
pools: 6 pools, 48 pgs
objects: 212 objects, 6.60KiB
usage: 5.78GiB used, 24.2GiB / 30.0GiB avail
pgs: 48 active+clean

But: {
"default_info": "",
"realms": [
"test-realm"
]
}

radosgw-admin realm list

The output is similar for zonegroup, the zone, etc (default id is empty). Starting the radosgw:

radosgw -d --rgw-zone=test-zone --cluster ceph --name client.rgw.gateway
2018-10-24 12:10:03.112011 7fd5c5f00000 0 ceph version 12.2.8 (ae699615bac534ea496ee965ac6192cb7e0e07c0) luminous (stable), process radosgw, pid 661
2018-10-24 12:10:03.258845 7fd5c5f00000 0 Error: init zone test-zone:(2) No such file or directory
2018-10-24 12:10:03.258905 7fd5c5f00000 0 Error: get_zones_pool_names-2
2018-10-24 12:10:03.258908 7fd5c5f00000 0 ERROR: fix_pool_names returned r=-2
2018-10-24 12:10:03.258925 7fd5c5f00000 0 create_default: error in create_default zone params: (2) No such file or directory
2018-10-24 12:10:03.258934 7fd5c5f00000 0 failure in zonegroup create_default: ret -2 (2) No such file or directory
2018-10-24 12:10:03.260980 7fd5c5f00000 -1 Couldn't init storage provider (RADOS)

Any idea what is happening and how to fix it?

p.s.

I tested the bootstrap and start scripts in a single container and everything is ok, but it seems that when the current filesystem is committed (after the bootstrap script finishes) as an image something is lost?

The bootstrap script ends with this:

kill -s TERM $(cat /hada-ceph/run/client.rgw.gateway.pid)
sleep 5

ceph osd set noout
ceph osd set norecover
ceph osd set norebalance
ceph osd set nobackfill
ceph osd set nodown
ceph osd set pause
sleep 5

kill -s TERM $(cat /hada-ceph/run/osd.0.pid)
kill -s TERM $(cat /hada-ceph/run/mon.0.pid)
kill -s TERM $(cat /hada-ceph/run/mgr.x.pid)

rm -f /hada-ceph/run/*

The startup script does this:

ceph-mon --id 0
ceph-mgr --id x
ceph-osd --id 0

sleep 2

ceph osd unset noout
ceph osd unset norecover
ceph osd unset norebalance
ceph osd unset nobackfill
ceph osd unset nodown
ceph osd unset pause

radosgw -d --rgw-zone=test-zone --cluster ceph --name client.rgw.gateway

Actions #1

Updated by Greg Farnum over 5 years ago

  • Status changed from New to Closed

I think for container problems you need to go to https://github.com/ceph/ceph-container/issues or https://github.com/ceph/cn/issuesat the moment; sorry for the tracker confusion...

Actions

Also available in: Atom PDF