Cannot remove group
Summary
I want to remove the group but have a 500 error response from Gitlab. Before doing this, I deleted the group name folder in /var/opt/git-data/repositories/$mygroup
. So now I can't remove it properly.
Steps to reproduce
- Delete group name folder in
/var/opt/git-data/repositories/
. - Go to admin panel: Overview -> Groups. Choose "Delete".
What is the current bug behavior?
500 error.
What is the expected correct behavior?
Should remove the group.
Relevant logs and/or screenshots
When I try to delete:
==> /var/log/gitlab/gitlab-rails/production_json.log <==
{"method":"DELETE","path":"/admin/groups/MyGroup","format":"html","controller":"Admin::GroupsController","action":"destroy","status":500,"error":"NoMethodError: undefined method `soft_delete_without_removing_associations' for nil:NilClass","duration":20.04,"view":0.0,"db":2.96,"time":"2018-01-02T12:45:20.770Z","params":{"_method":"delete","authenticity_token":"[FILTERED]","id":"MyGroup"},"remote_ip":"172.17.0.1","user_id":1,"username":"root"}
==> /var/log/gitlab/gitlab-rails/production.log <==
NoMethodError (undefined method `soft_delete_without_removing_associations' for nil:NilClass):
app/services/groups/destroy_service.rb:6:in `async_execute'
app/controllers/admin/groups_controller.rb:59:in `destroy'
lib/gitlab/i18n.rb:47:in `with_locale'
lib/gitlab/i18n.rb:53:in `with_user_locale'
app/controllers/application_controller.rb:332:in `set_locale'
lib/gitlab/middleware/multipart.rb:93:in `call'
lib/gitlab/request_profiler/middleware.rb:14:in `call'
lib/gitlab/jira/middleware.rb:15:in `call'
lib/gitlab/middleware/go.rb:18:in `call'
lib/gitlab/etag_caching/middleware.rb:11:in `call'
lib/gitlab/middleware/read_only.rb:31:in `call'
lib/gitlab/request_context.rb:18:in `call'
lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Proxy: no_proxy: *.local, 169.254/16 Current User: git Using RVM: no Ruby Version: 2.3.5p376 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.4 Go Version: unknownGitLab information Version: 10.3.1-ee Revision: 24b685b Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql DB Version: 9.6.5 URL: http://git.mydomain.com HTTP Clone URL: http://git.mydomain.com/some-group/some-project.git SSH Clone URL: git@git.mydomain.com:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: no
GitLab Shell Version: 5.10.2 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
GitLab Shell version >= 5.10.2 ? ... OK (5.10.2) 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: ... can't check, you have no projects Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/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
Reply by email is disabled in config/gitlab.yml Checking LDAP ...
LDAP is disabled in config/gitlab.yml
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? ... skipped (no tmp uploads folder yet) 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: ... can't check, you have no projects Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.3.5) Git version >= 2.7.3 ? ... yes (2.14.3) Git user has default SSH configuration? ... yes Active users: ... 5 Elasticsearch version 5.1 - 5.5? ... skipped (elasticsearch is disabled)