After deleting user, data disappeared instead of being transferred under Ghost User
Summary
I was cleaning up our repository and I was deleting old inactive users. I didn't notice one of them still owned a project and deleted that user. By default this project should have transfered ownership under "Ghost User", but that didn't happen. Now the project is nonexistent.
Components
- GitLab - 13.9.4 (4be21b77456)
- GitLab Shell - 13.17.0
- GitLab Workhorsev - 13.9.4
- GitLab API - v4
- Ruby - 2.7.2p137
- Rails - 6.0.3.4
- PostgreSQL - 12.5
- Redis - 6.0.10
Steps to reproduce
- Create test user
- Create new project under said user
- Add some files to this project so it is not empty
- Delete said user
- Project is gone and Ghost User doesn't have any
What is the current bug behavior?
All data belonging to user are lost after deleting him. (choosing just to delete user and not the other option where it is delete user and data).
What is the expected correct behavior?
User should be deleted, but any data owned by him should have transfered ownership to Ghost User. (as per wiki)
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 16.04 Current User: git Using RVM: no Ruby Version: 2.7.2p137 Gem Version: 3.1.4 Bundler Version:2.1.4 Rake Version: 13.0.3 Redis Version: 6.0.10 Git Version: 2.29.0 Sidekiq Version:5.2.9 Go Version: unknown GitLab information Version: 13.9.4 Revision: 4be21b77456 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 12.5 URL: http://rep.gaiagroup.cz HTTP Clone URL: http://rep.gaiagroup.cz/some-group/some-project.git SSH Clone URL: git@rep.gaiagroup.cz:some-group/some-project.git Using LDAP: no Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 13.17.0 Repository storage paths: - default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 13.17.0 ? ... OK (13.17.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
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? ... no Try fixing it: sudo chown -R git /var/opt/gitlab/gitlab-rails/uploads sudo find /var/opt/gitlab/gitlab-rails/uploads -type f -exec chmod 0644 {} ; sudo find /var/opt/gitlab/gitlab-rails/uploads -type d -not -path /var/opt/gitlab/gitlab-rails/uploads -exec chmod 0700 {} ; For more information see: doc/install/installation.md in section "GitLab" Please fix the error above and rerun the checks. 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: ... 1/2 ... yes 2/3 ... yes 2/4 ... yes 2/5 ... yes 2/6 ... yes 3/7 ... yes 3/8 ... yes 2/10 ... yes 2/12 ... yes 2/13 ... yes 2/16 ... yes 1/17 ... yes 2/18 ... yes 1/19 ... yes 2/20 ... yes 1/21 ... yes 2/23 ... yes 5/24 ... yes 1/25 ... yes 3/26 ... yes 5/27 ... yes 2/28 ... yes 2/29 ... yes 2/30 ... yes 2/31 ... yes 2/32 ... yes 2/33 ... yes 2/35 ... yes 1/36 ... yes 2/37 ... yes 1/38 ... yes 2/39 ... yes 1/41 ... yes 2/42 ... yes 1/43 ... yes 2/44 ... yes 1/45 ... yes 1/46 ... yes 2/47 ... yes 2/48 ... yes 2/49 ... yes 2/51 ... yes 12/52 ... yes 1/53 ... yes 2/54 ... yes 1/55 ... yes 3/56 ... yes 12/57 ... yes 1/58 ... yes 12/59 ... yes 1/60 ... yes 1/61 ... yes 12/62 ... yes 3/66 ... yes 12/67 ... yes 1/69 ... yes 26/71 ... yes 26/72 ... yes 26/73 ... yes 3/74 ... yes 26/75 ... yes Redis version >= 4.0.0? ... yes Ruby version >= 2.7.2 ? ... yes (2.7.2) Git version >= 2.29.0 ? ... yes (2.29.0) Git user has default SSH configuration? ... yes Active users: ... 20 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
Possible fixes
...
