GitLab cancella accidentalmente il database di produzione
Se andate su GitLab adesso troverete il seguente messaggio:
GitLab.com is currently offline due to issues with our production database.
We’re working hard to resolve the problem quickly. Follow GitLabStatus for the latest updates.
Comunicando attraverso Google Docs scopriamo maggiori dettagli:
- LVM snapshots are by default only taken once every 24 hours. YP happened to run one manually about 6 hours prior to the outage
- Regular backups seem to also only be taken once per 24 hours, though YP has not yet been able to figure out where they are stored. According to JN these don’t appear to be working, producing files only a few bytes in size. It looks like pg_dump may be failing because PostgreSQL 9.2 binaries are being run instead of 9.6 binaries. This happens because omnibus only uses Pg 9.6 if data/PG_VERSION is set to 9.6, but on workers this file does not exist. As a result it defaults to 9.2, failing silently. No SQL dumps were made as a result. Fog gem may have cleaned out older backups.
- Disk snapshots in Azure are enabled for the NFS server, but not for the DB servers.
- The synchronisation process removes webhooks once it has synchronised data to staging. Unless we can pull these from a regular backup from the past 24 hours they will be lost
- The replication procedure is super fragile, prone to error, relies on a handful of random shell scripts, and is badly documented. The staging DB refresh works by taking a snapshot of the gitlab_replicator directory, prunes the replication configuration, and starts up a separate PostgreSQL server.
- Our backups to S3 apparently don’t work either: the bucket is empty
So in other words, out of 5 backup/replication techniques deployed none are working reliably or set up in the first place.
A quanto pare le repo sono salve mentre non si può dire la stessa cosa per gli issues e i merge requests, morale della favola?
E’ giusto fare i backup ma è altrettanto importante testarli!
UPDATE: GitLab ha scritto un post dopo la tempesta. Un applauso per la trasparenza e per il modo in cui hanno affrontato il problema.