Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with Mounting GlusterFS Storage in Docker Compose for GitLab #4430

Open
Said-devops-tm opened this issue Nov 6, 2024 · 2 comments
Open

Comments

@Said-devops-tm
Copy link

Said-devops-tm commented Nov 6, 2024

I have set up GlusterFS storage and created a directory on my local host machine, which I then mounted to the GlusterFS storage.

When I mount a directory from my local host machine in the volumes section of the docker-compose.yml file, both the GitLab image and the GitLab Runner deploy successfully without any issues.

However, when I try to mount the GlusterFS storage path in the volumes section of the Compose file, the built-in PostgreSQL instance within the GitLab image fails to mount to the GlusterFS storage. The deployment works fine for GitLab itself, but PostgreSQL encounters problems.

Has anyone experienced similar issues, or could someone provide guidance on how to resolve this?

Here is my compose file (mounted on host machine) works perfectly:

version: "3.6"
services:
gitlab:
image: private.registry.com/docker/gitlab-ce:17.3.6-ce.0
deploy:
mode: global
placement:
constraints: [node.id == ymqksna8bxikggkusfujaunk4]
container_name: gitlab
restart: always
hostname: 'gitlab.example.com'
ports:
- "2222:22"
- "80:80"
- "443:443"
volumes:
- /srv/gitlab/data:/var/opt/gitlab
- /srv/gitlab/logs:/var/log/gitlab
- /srv/gitlab/config:/etc/gitlab
shm_size: '256m'
environment:
GITLAB_OMNIBUS_CONFIG: "from_file('/omnibus_config.rb')"
configs:
- source: gitlab
target: /omnibus_config.rb
secrets:
- gitlab_root_password
gitlab-runner:
image: gitlab/gitlab-runner:alpine
deploy:
mode: replicated
replicas: 4
configs:
gitlab:
file: ./gitlab.rb
secrets:
gitlab_root_password:
file: ./root_password.txt

Here is my compose file (mounted glusterfs storage) fails:
version: "3.6"
services:
gitlab:
image: private.registry.com/docker/gitlab-ce:17.3.6-ce.0
container_name: gitlab
restart: always
hostname: 'gitlab.example.com'
ports:
- "2222:22"
- "80:80"
- "443:443"
volumes:
- /mnt/glusterfs/data:/var/opt/gitlab
- /mnt/glusterfs/logs:/var/log/gitlab
- /mnt/glusterfs/config:/etc/gitlab
shm_size: '256m'
environment:
GITLAB_OMNIBUS_CONFIG: "from_file('/omnibus_config.rb')"
configs:
- source: gitlab
target: /omnibus_config.rb
secrets:
- gitlab_root_password
gitlab-runner:
image: gitlab/gitlab-runner:alpine
deploy:
mode: replicated
replicas: 4
configs:
gitlab:
file: ./gitlab.rb
secrets:
gitlab_root_password:
file: ./root_password.txt

Log says:
[2024-11-06T10:31:13+00:00] FATAL: RuntimeError: database_objects[postgresql] (postgresql::standalone line 32) had an error: RuntimeError: postgresql_user[gitlab] (postgresql::standalone line 28) had an error: RuntimeError: execute[create gitlab postgresql user] (postgresql::standalone line 13) had an error: RuntimeError: Exhausted service checks and database is still not available

@pranithk
Copy link
Member

I don't think anyone got glusterfs to work correctly with database to my knowledge.

@Said-devops-tm
Copy link
Author

Said-devops-tm commented Nov 12, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants