Can't change the directories in gitlab.rb

Hello,

now I’ve install a new server with more RAM and a very big RAID5. During the configuration of gitlab-ee I can’t change the directories for the files:

git_data_dirs({ "default" => {"path" => "/sw-raid/gitlab/git-data" }})
gitlab_rails['lfs_storage_path'] = "/sw-raid/gitlab/lfs-objects"
gitlab_rails['backup_path'] = "/sw-raid/backup/gitlab"

My system is a:

  • Asus ROG Maximus XI hero (WI-FI)
  • Intel i9
  • 128GB RAM
  • 1x 1GB M2 PCIe SSD
  • 1x 18TB Mirror Backup HDD
  • 4x 18TB HDD with RAID5
  • OS Debian “Linux deponie 4.19.0-20-amd64 #1 SMP Debian 4.19.235-1 (2022-03-17) x86_64 GNU/Linux”
  • at the moment running services and so on: bind9, isc-dhcp-server, samba, nginx, postfix, ntp

Installed gitlab:

root@deponie:/# apt list gitlab-ee
Auflistung... Fertig
gitlab-ee/buster,now 14.9.3-ee.0 amd64  [installiert]
N: Es gibt 286 zusätzliche Versionen. Bitte verwenden Sie die Option »-a«, um sie anzuzeigen.

Now when I run gitlab-ctl reconfigure the following errors come:

Running handlers:
There was an error running gitlab-ctl reconfigure:

storage_directory[/sw-raid/gitlab/git-data] (gitlab::gitlab-rails line 46) had an error: Mixlib::ShellOut::ShellCommandFailed: ruby_block[directory resource: /sw-raid/gitlab/git-data] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/package/resources/storage_directory.rb line 34) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of stat --printf='%U' $(readlink -f /sw-raid/gitlab/git-data) ----
STDOUT: 
STDERR: stat: fehlender Operand
„stat --help“ liefert weitere Informationen.
---- End output of stat --printf='%U' $(readlink -f /sw-raid/gitlab/git-data) ----
Ran stat --printf='%U' $(readlink -f /sw-raid/gitlab/git-data) returned 1

The standard configuration works without problems.
When I start the reconfiguration wihtout the git-data directory, it is generated with the following permissions

root@deponie:/# ls -la /sw-raid/gitlab/
insgesamt 12
drwxr-xr-x  3 root root 4096 Apr 13 19:40 .
drwx------ 12 root root 4096 Apr 13 19:06 ..
drwxr-xr-x  2 root root 4096 Apr 13 19:40 git-data

OK, the owner and so from this directory is not correct, so I changed it to

drwx------  2 git  git  4096 Apr 13 19:40 git-data

and the error is not solved. When I change the configuration for the git-data to:

git_data_dirs({"default" => {"path" => "/var/opt/gitlab/git-data"}})

than works this directory.

The same behavior is by the other two configuration points. Have everyone a idea for this mismatch? On the WWW I found only the hint that the access right or owner are not correct.

Thanks for our help,
Bernd

So, I can’t say why. But now it works correct. What have I doo? I have restart the machine and install virtualbox as root, than switch to an user and configured it. And now I will recheck this problem and it is solved.

Mysterios.

1 Like