Skip to content

Disabling push mirror raises error 500

https://sentry.gitlap.com/gitlab/gitlabcom/issues/110992/

Rugged::OSError: failed to lock file '/var/opt/gitlab/git-data-file08/repositories/gitlab-org/gitlab-ce.git/packed-refs.lock' for writing: 
  lib/gitlab/git/repository.rb:917:in `delete'
    rugged.remotes.delete(remote_name)
  lib/gitlab/git/repository.rb:917:in `remove_remote'
    rugged.remotes.delete(remote_name)
  app/models/repository.rb:470:in `method_missing'
    raw_repository.__send__(m, *args, &block) # rubocop:disable GitlabSecurity/PublicSend
  lib/gitlab/metrics/instrumentation.rb:159:in `block in method_missing'
    .measure { super }
  lib/gitlab/metrics/method_call.rb:53:in `measure'
    retval = yield
...
(229 additional frame(s) were not displayed)

Rugged::OSError: failed to lock file '/var/opt/gitlab/git-data-file08/repositories/gitlab-org/gitlab-ce.git/packed-refs.lock' for writing: 

To replicate:

  • Enable remote push mirror on a project and save
  • Reload the page
  • Try to disable remote mirroring by unchecking the checkbox and save

/cc @DouweM @tiagonbotelho

Edited by Marin Jankovski