Debian Jessie - no longer update possible with apt-repository

Hello, i always kept Gitlab uptodate using the repository under
deb https://packages.gitlab.com/gitlab/gitlab-ce/debian/ jessie main

which worked without issues.

Unfortunately the last two updates where not successful and it showed the following error:

``

Recipe: gitlab::gitlab-shell
* ruby_block[directory resource: /mnt/data/git-data] action run
- execute the ruby block directory resource: /mnt/data/git-data
* ruby_block[directory resource: /mnt/data/git-data/repositories] action run

================================================================================
Error executing action `run` on resource 'ruby_block[directory resource: /mnt/data/git-data/repositories]'
================================================================================

Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of test -d "/mnt/data/git-data/repositories" -a "$(stat --printf='%U %04a' /mnt/data/git-data/repositories)" = 'git 2770' ----
STDOUT:
STDERR:
---- End output of test -d "/mnt/data/git-data/repositories" -a "$(stat --printf='%U %04a' /mnt/data/git-data/repositories)" = 'git 2770' ----
Ran test -d "/mnt/data/git-data/repositories" -a "$(stat --printf='%U %04a' /mnt/data/git-data/repositories)" = 'git 2770' returned 1

Cookbook Trace:
---------------
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/storage_directory_helper.rb:35:in `run_command'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/storage_directory_helper.rb:89:in `validate'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/libraries/storage_directory_helper.rb:82:in `validate!'
/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/definitions/storage_directory.rb:35:in `block (3 levels) in from_file'

Resource Declaration:
---------------------
# In /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/definitions/storage_directory.rb

 26:   ruby_block "directory resource: #{params[:path]}" do
 27:     block do
 28:       # Ensure the directory exists
 29:       storage_helper.ensure_directory_exists(params[:path])
 30:
 31:       # Ensure the permissions are set
 32:       storage_helper.ensure_permissions_set(params[:path])
 33:
 34:       # Error out if we have not achieved the target permissions
 35:       storage_helper.validate!(params[:path])
 36:     end
 37:     not_if { storage_helper.validate(params[:path]) }
 38:   end
 39: end

Compiled Resource:
------------------
# Declared in /opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/definitions/storage_directory.rb:26:in `block in from_file'

ruby_block("directory resource: /mnt/data/git-data/repositories") do
  params {:path=>"/mnt/data/git-data/repositories", :owner=>"git", :group=>nil, :mode=>"2770", :name=>"/mnt/data/git-data/repositories"}
  action [:run]
  retries 0
  retry_delay 2
  default_guard_interpreter :default
  block_name "directory resource: /mnt/data/git-data/repositories"
  declared_type :ruby_block
  cookbook_name "gitlab"
  recipe_name "gitlab-shell"
  block #<Proc:0x000000062034c8@/opt/gitlab/embedded/cookbooks/cache/cookbooks/gitlab/definitions/storage_directory.rb:27>
  not_if { #code block }
end

Platform:
---------
x86_64-linux

Running handlers:
Running handlers complete
Chef Client failed. 2 resources updated in 17 seconds
dpkg: Fehler beim Bearbeiten des Paketes gitlab-ce (--configure):
 Unterprozess installiertes post-installation-Skript gab den Fehlerwert 1 zurück
Trigger für libc-bin (2.19-18+deb8u6) werden verarbeitet ...
Fehler traten auf beim Bearbeiten von:
 gitlab-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)

``

So i had to revert back to a Backup. Since the last update also did not work, i would like to know what is going wrong.

The Repository directory is accesible without issues.

The repository folder is a regular EXT4 Filesystem which is shared using NFS for a bugtracker / Tickets system to access in the local network. So i don’t think that is the issue, since it worked before.

Thanks in advance for any hint of the issue.

That looks like something is amiss with your /mnt/data/git-data/repositories (presumably where you’ve configured your repositories to live); the test is confirming it (a) is a directory; (b) is owned by user git and has mode 2770 (rwxrws---).

Thanks, so that means my access rights to the repositories are wrong?

Its true that the user “git” owns the directories and files, but the access rights are drwxrwxrwx for git-data/repositories

So i would think that everything is allowed to access it. And since it works with an older version, either something changed in gitlab that it is now no longer accepted or something different is wrong.

I dare say access rights of a+rwx is almost always wrong. You probably don’t want everyone to be able to fiddle with your repositories, only people who have authenticated through GitLab.

On my omnibus install, ti’s 2770 as the script expects. I haven’t had to ever manually change that.

Curious, is your /mnt/data something that doesn’t support Unix permissions? Not sure why else it’d get set to 777.