ceph / ceph-container

Docker files and images to run Ceph in containers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RocksDBStore - cannot set permissions: Operation not permitted

gandolh opened this issue · comments

Is this a bug report or feature request?

  • Bug Report

What happened:
Hello, I'm trying to create a docker compose file that creates monitor and others containers for Ceph. It uses ceph/daemon and it works for images up to "v5.0.12-stable-5.0-octopus-centos-8".

I tried to use it for "v6.0.4-stable-6.0-pacific-centos-8" and quay.io (latest) but monitor container keeps logging this error:

docker compose up mon1
[+] Running 1/0
 ✔ Container ceph-pure2-mon1-1  Created                                                                                              0.0s
Attaching to ceph-pure2-mon1-1
ceph-pure2-mon1-1  | creating /etc/ceph/ceph.client.admin.keyring
ceph-pure2-mon1-1  | creating /etc/ceph/ceph.mon.keyring
ceph-pure2-mon1-1  | monmaptool: monmap file /etc/ceph/monmap-ceph
ceph-pure2-mon1-1  | monmaptool: set fsid to b9b4a7be-3fcb-45c1-8913-b765dc63bb64
ceph-pure2-mon1-1  | monmaptool: writing epoch 0 to /etc/ceph/monmap-ceph (1 monitors)
ceph-pure2-mon1-1  | importing contents of /etc/ceph/ceph.client.admin.keyring into /etc/ceph/ceph.mon.keyring
ceph-pure2-mon1-1  | terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
ceph-pure2-mon1-1  |   what():  filesystem error: cannot set permissions: Operation not permitted [/var/lib/ceph/mon/ceph-2b58a2442c7f/store.db]
ceph-pure2-mon1-1  | *** Caught signal (Aborted) **
ceph-pure2-mon1-1  |  in thread 7fec698c4700 thread_name:ceph-mon
ceph-pure2-mon1-1  |  ceph version 16.2.5 (0883bdea7337b95e4b611c768c0279868462204a) pacific (stable)
l()
ceph-pure2-mon1-1  |  3: abortceph-pure2-mon1-1  |  1: /lib64/libpthread.so.0(+0x12b20) [0x7fec5e54cb20]
[...]
ceph-pure2-mon1-1  | /opt/ceph-container/bin/start_mon.sh: line 81:    78 Aborted                 ceph-mon --setuser ceph --setgroup ceph --cluster "${CLUSTER}" --mkfs -i "${MON_NAME}" --inject-monmap "$MONMAP" --keyring "$MON_KEYRING" --mon-data "$MON_DATA_DIR"
ceph-pure2-mon1-1 exited with code 134

Docker compose file:

version: "3"
networks:
  cluster-net:
    name: ceph-cluster-net
    external: true
services:

  mon1:
    image: ceph/daemon:${CEPH_CONTAINER_VERSION}
    command: "mon"
    environment:
      MON_IP: ${MON1_IP}
      CEPH_PUBLIC_NETWORK: ${MON1_CEPH_PUBLIC_NETWORK}
      LANG: ${LANG}
      TZ: ${TZ}
    volumes:
      - ${VOLUMES_PATH}/ceph:/etc/ceph
      - ${VOLUMES_PATH}/lib/:/var/lib/ceph/
    networks:
      - cluster-net
      [...]

env file

LANG=en_US.utf8
TZ=UTC
CEPH_CONTAINER_VERSION=v5.0.12-stable-5.0-octopus-centos-8
VOLUMES_PATH=./volumes_data/ceph
OSD_PATH=./volumes_data/osds
DASHBOARD_PORT=8443
INTERNAL_DASHBOARD_PORT=8443
RGW_PORT=8080
MON1_IP=172.16.0.2
MON1_CEPH_PUBLIC_NETWORK=172.16.0.0/16
</code>
running commands:
<code>
docker network create --driver bridge --subnet=172.16.0.0/16 ceph-cluster-net
docker compose up mon1

Environment:

  • OS: Docker Desktop on windows with wsl2 (kali)
  • Docker version (e.g. docker version): 24.0.5