gluster / gluster-containers

Dockerfiles (CentOS, Fedora, Red Hat) for GlusterFS
https://github.com/gluster/gluster-containers/pkgs/container/gluster-containers
223 stars 135 forks source link

Glusterd not running #116

Open shb256 opened 5 years ago

shb256 commented 5 years ago

Hello,

I 've tried to setup gluster in docker on an synology. i ve done these steps ash-4.3# docker run -v /volume1/gluster/etc_glusterfs/:/etc/glusterfs:z -v /volume1/gluster/lib_glusterd:/var/lib/glusterd:z -v /volume1/gluster/log_glusterfs:/var/log/glusterfs:z -v /sys/fs/cgroup:/sys/fs/cgroup:ro -d --privileged=true --net=host -v /volume1/gluster/brick1/:/brick1 --name gluster gluster/gluster-centos a43aaaba3146de16d68ac03a27b10c5cb81af82edd79ee2009670436a5e74a76 ash-4.3# docker exec -ti gluster bash [root@rd815P /]# ps aux|grep glusterd root 28 0.0 0.0 12516 968 ? S+ 07:33 0:00 grep --color=auto glusterd [root@rd815P /]# systemctl status glusterd Failed to get D-Bus connection: No such file or directory [root@rd815P /]# I am not sure what's the problem

maybe somebody can point me right direction thanks

phlogistonjohn commented 5 years ago

Not sure what kind of environment a synology is, but I am able to get a similar command line functioning on my system (fedora 28, podman):

sudo podman run -v /srv/gluster1/etc:/etc/glusterfs:z -v /srv/gluster1/lib:/var/lib/glusterd:z -v /srv/gluster1/log:/var/log/glusterfs:z -v /sys:/sys --privileged=true --net=host -v /srv/gluster1/bricks/brick1/:/brick1 --name gluster gluster/gluster-centos

Within the running container systemd appears to function correctly.

$ sudo podman exec -it gluster bash

[root@popcorn /]#
[root@popcorn /]#       systemctl status glusterd
● glusterd.service - GlusterFS, a clustered file-system server
   Loaded: loaded (/usr/lib/systemd/system/glusterd.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2018-12-20 16:46:36 UTC; 1min 10s ago
  Process: 74 ExecStart=/usr/sbin/glusterd -p /var/run/glusterd.pid --log-level $LOG_LEVEL $GLUSTERD_OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 75 (glusterd)
   CGroup: /machine.slice/libpod-a4568b9c2d4f07fbe58293e7dbf603503cf917696fc87c4a79e98906e3f3c7d0.scope/system.slice/glusterd.service
           └─75 /usr/sbin/glusterd -p /var/run/glusterd.pid --log-level INFO
           ‣ 75 /usr/sbin/glusterd -p /var/run/glusterd.pid --log-level INFO

Dec 20 16:46:35 popcorn systemd[1]: Starting GlusterFS, a clustered file-system .....
Dec 20 16:46:36 popcorn systemd[1]: Started GlusterFS, a clustered file-system s...r.
Hint: Some lines were ellipsized, use -l to show in full.
[root@popcorn /]# mkdir /brick1/brick
[root@popcorn /]# gluster vol create foobar  10.18.41.39:/brick1/brick
volume create: foobar: success: please start the volume to access data
[root@popcorn /]# gluster vol start foobar
volume start: foobar: success
[root@popcorn /]# gluster vol list
foobar

I would investigate along the lines of what version of docker the synology system provides and check if systemd/dbus is generating any logs explaining why it does not start inside the container.

shb256 commented 5 years ago

ash-4.3# whoami root ash-4.3# docker --version Docker version 17.05.0-ce, build 9f07f0e-synology ash-4.3# [root@rd815P /]# dbus-monitor --system Failed to open connection to system bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory

what are the next steps?