(re)configure timeouts on usermod git

Summary

(re)configure timeouts on usermod git

context

I'm using the official docker image. I upgraded from gitlab/gitlab-ee:8.17.5-ee.0 to gitlab/gitlab-ee:8.17.7-ee.0

Restarting the docker with the new image failed like this:

Preparing services...
Starting services...
Configuring GitLab package...
/opt/gitlab/embedded/bin/runsvdir-start: line 37: /proc/sys/fs/file-max: Read-only file system
Configuring GitLab...

================================================================================
Error executing action `create` on resource 'user[GitLab user and group]'
================================================================================

Mixlib::ShellOut::CommandTimeout
--------------------------------
Command timed out after 600s:
Command exceeded allowed execution time, process terminated
---- Begin output of ["usermod", "-u", "134000035", "git"] ----
STDOUT: 
STDERR: 
---- End output of ["usermod", "-u", "134000035", "git"] ----
Ran ["usermod", "-u", "134000035", "git"] returned 

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

 39:     user params[:name] do
 40:       username username
 41:       shell params[:shell]
 42:       home params[:home]
 43:       uid params[:uid]
 44:       gid params[:ugid]
 45:       system params[:system]
 46:       supports params[:user_supports]
 47:       action params[:action]
 48:     end
 49:   end

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

user("GitLab user and group") do
  params {:action=>nil, :username=>"git", :uid=>134000035, :ugid=>"git", :groupname=>"git", :gid=>134000035, :shell=>"/bin/sh", :home=>"/var/opt/gitlab", :system=>true, :append_to_group=>false, :group_members=>[], :user_supports=>{}, :manage=>true, :name=>"GitLab user and group"}
  action [:create]
  supports {:manage_home=>false, :non_unique=>false}
  retries 0
  retry_delay 2
  default_guard_interpreter :default
  username "git"
  uid 134000035
  gid 134000035
  home "/var/opt/gitlab"
  shell "/bin/sh"
  system true
  iterations 27855
  declared_type :user
  cookbook_name "gitlab"
  recipe_name "users"
end

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

I tried several times.

analysis

The usermod -u xxx git seems to timeout. The usermod command updates all files owned by the user. I have a lot of repos with a lot of files, and using a ZFS filesystem, so that it is expected that the usermod command takes more then 600s.

Work around

I tried to put all files in system cache before running the configure, e.g. chown -R xxxxx /path/to/gitlab/git-data and it worked.

Assignee Loading
Time tracking Loading