[DRE-maint] Bug#814458: gitlab postinst deletes existing data from postgresql database
Johannes Schauer
josch at debian.org
Thu Feb 11 18:39:24 UTC 2016
Package: gitlab
Version: 8.4.3+dfsg-1
Severity: critical
Justification: causes serious data loss
Hi,
I previously encountered bug #812841, so I left gitlab as unconfigured
by apt/dpkg and started it manually using `systemctl start gitlab.target`
This seems to have worked well and gitlab was able to make use of the
existing database table from my old manual installation of version
7.8.4.
Then later I wanted to install an unrelated package, so apt/dpkg were
running the gitlab postinst again. As part of the postinst, the database
seems to be completely overwritten with new content. All my existing
content would've been lost if I hadn't made a backup beforehand.
That I now have an empty gitlab instance can be seen from the following
output:
gitlab at 22gitlab:~$ rake gitlab:check RAILS_ENV=production
fatal: Not a git repository (or any of the parent directories): .git
Checking GitLab Shell ...
GitLab Shell version >= 2.6.10 ? ... OK (2.6.10)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by gitlab:gitlab? ... yes
Repo base access is drwxrws---? ... yes
hooks directories in repos are links: ... can't check, you have no projects
Running /usr/share/gitlab-shell/bin/check
Check GitLab API access: FAILED. code: 302
gitlab-shell self-check failed
Try fixing it:
Make sure GitLab is running;
Check the gitlab-shell configuration file:
sudo -u gitlab -H editor /usr/share/gitlab-shell/config.yml
Please fix the error above and rerun the checks.
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... skipped (no tmp uploads folder yet)
Init script exists? ... yes
Init script up-to-date? ... yes
projects have namespace: ... can't check, you have no projects
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.2.4)
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... yes (2.1.4)
Active users: 1
Checking GitLab ... Finished
This should not happen!
Thanks!
cheers, josch
More information about the Pkg-ruby-extras-maintainers
mailing list