Gitlab in lxc: creating project not working

haglo

Member
Jul 24, 2020
16
1
8
63
I have proxmox VE 7.0-8
I have created LXC privileged based on Ubuntu 20.04
I have installed Gitlab 14.2.3-ee
Gitlab is working.

My lxc.conf of the container is:
Code:
arch: amd64
cores: 2
hostname: clark
memory: 8192
mp0: /zpool/gitlab,mp=/data
nameserver: 134.60.72.40 8.8.8.8
net0: name=eth0,bridge=vmbr0,firewall=1,gw=134.60.72.1,hwaddr=92:8D:55:55:9D:45,ip=134.60.72.43/24,type=veth
ostype: ubuntu
rootfs: local-lvm:vm-103-disk-0,size=30G
searchdomain: ertis.ulm informatik.uni-ulm.de
swap: 2048
lxc.apparmor.profile: unconfined
lxc.mount.auto: proc:rw

I mount from Proxmox into container


When i want to create a new Project in Gitlab i get the following errror
JSON:
==> /var/log/gitlab/gitaly/current <==
{"correlation_id":"01FGV1S0BKW5VNQQRQGJ9FJW4Z","grpc.code":"OK","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"unary","grpc.method":"RepositoryExists","grpc.request.deadline":"2021-09-30T11:50:20.006Z","grpc.request.fullMethod":"/gitaly.RepositoryService/RepositoryExists","grpc.request.glProjectPath":"","grpc.request.glRepository":"","grpc.request.repoPath":"@hashed/3f/db/3fdba35f04dc8c462986c992bcf875546257113072a909c162f7e470e581e278.git","grpc.request.repoStorage":"default","grpc.service":"gitaly.RepositoryService","grpc.start_time":"2021-09-30T11:50:10.576Z","grpc.time_ms":0.102,"level":"info","msg":"finished unary call with code OK","peer.address":"@","pid":382,"remote_ip":"134.60.73.39","span.kind":"server","system":"grpc","time":"2021-09-30T11:50:10.576Z","username":"root"}
{"full_method_name":"/gitaly.RepositoryService/CreateRepository","level":"error","msg":"mkdir /data/repositories/+gitaly/state: permission denied","time":"2021-09-30T11:50:10.617Z"}
{"correlation_id":"01FGV1S0BKW5VNQQRQGJ9FJW4Z","error":"create directories: mkdir /data/repositories/@hashed/3f: permission denied","grpc.code":"Internal","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_type":"unary","grpc.method":"CreateRepository","grpc.request.deadline":"2021-09-30T11:50:20.007Z","grpc.request.fullMethod":"/gitaly.RepositoryService/CreateRepository","grpc.request.glProjectPath":"root/todel1","grpc.request.glRepository":"project-13","grpc.request.repoPath":"@hashed/3f/db/3fdba35f04dc8c462986c992bcf875546257113072a909c162f7e470e581e278.git","grpc.request.repoStorage":"default","grpc.service":"gitaly.RepositoryService","grpc.start_time":"2021-09-30T11:50:10.617Z","grpc.time_ms":0.203,"level":"error","msg":"finished unary call with code Internal","peer.address":"@","pid":382,"remote_ip":"134.60.73.39","span.kind":"server","system":"grpc","time":"2021-09-30T11:50:10.617Z","username":"root"}

I have no write Permission to the folder, which i have mounted from proxmox into the lxc-Container

How can i fix it?
 
Hi,

The mount point, the /data folder, will be always as root. Crete a subfolder like /data/gitlab with the right permissions and set that subfolder as data folder for GitLab.

Rares
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!