rake task: gitlab:user:check_repos : "NoMethodError"
Summary
gitlab:user:check_repos does not work in 10.4.
Applying steps listed at https://docs.gitlab.com/ee/administration/raketasks/check.html, completely fails.
sudo gitlab-rake gitlab:user:check_repos[<username>]
results in a fatal error
NoMethodError: undefined method `check_repo_integrity' for main:Object
Without username specification, an unexpected prompt is displayed:
Check repository integrity for fsername?
Inputting user name results in error seen above.
Steps to reproduce
- Fresh install of 10.4.3 RPMs on migrated project and user data (from 10.4.3, docker image based)
- Run rake step as above.
What is the current bug behavior?
See log output below.
What is the expected correct behavior?
See docs at https://docs.gitlab.com/ee/administration/raketasks/check.html
Relevant logs and/or screenshots
sudo gitlab-rake gitlab:user:check_repos[c10267]
rake aborted!
NoMethodError: undefined method `check_repo_integrity' for main:Object
Did you mean? check_repo_base_exists
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/check.rake:437:in `block (4 levels) in <top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/check.rake:437:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/check.rake:437:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => gitlab:user:check_repos
(See full trace by running task with --trace)
# sudo gitlab-rake gitlab:user:check_repos
Check repository integrity for fsername? c10267
rake aborted!
NoMethodError: undefined method `check_repo_integrity' for main:Object
Did you mean? check_repo_base_exists
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/check.rake:437:in `block (4 levels) in <top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/check.rake:437:in `each'
/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/check.rake:437:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => gitlab:user:check_repos
(See full trace by running task with --trace)
Results of GitLab environment info
System information System: Current User: git Using RVM: no Ruby Version: 2.3.6p384 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.3.0 Redis Version: 3.2.11 Git Version: 2.14.3 Sidekiq Version:5.0.5 Go Version: unknown GitLab information Version: 10.4.4 Revision: 1d22950 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: HTTP Clone URL: /some-group/some-project.git SSH Clone URL: git@:some-group/some-project.git Using LDAP: yes Using Omniauth: no GitLab Shell Version: 5.11.0 Repository storage paths: - default: /mnt/data/sameersbn/gitlab/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
All tests passed.
GitLab Shell version >= 5.11.0 ? ... OK (5.11.0) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 5/3 ... ok ... 692/2951 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK Access to /mnt/data/sameersbn/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful Checking GitLab Shell ... Finished Checking Sidekiq ... Running? ... yes Number of Sidekiq processes ... 1 Checking Sidekiq ... Finished Checking Reply by email ... IMAP server credentials are correct? ... yes Init.d configured correctly? ... skipped MailRoom running? ... skipped Checking Reply by email ... Finished Checking LDAP ... Server: ldapmain LDAP authentication... Success ... REDACTED ... Checking LDAP ... Finished Checking GitLab ... Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 5/3 ... yes ... REDACTED - ALL YES 692/2951 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.3.6) Git version >= 2.7.3 ? ... yes (2.14.3) Git user has default SSH configuration? ... yes Active users: ... 913 Checking GitLab ... Finished