Live data from Hacker News

GitLab Database Incident – Live Report

docs.google.com

41–50 of 621 posts

Re: GitLab Database Incident – Live Report

#41
post #14

Earlier quoted context omitted.

Good lesson on making command prompts on machines always tell you exactly what machine you're working on.

I like to color code my terminal. Production systems are always red. Dev are blue/green. Staging is yellow.

Is a really good idea, and is one of the improvements that are likely to be put in place as soon as possible. Its already listed on the document.

Re: GitLab Database Incident – Live Report

#42
post #12

Earlier quoted context omitted.

Yes, those are the initials of an employee here. Sorry for the confusion!

As much as I appreciate GitLabs extreme openness, that's maybe something that by policy shouldn't be part of published reports. Internal process is one thing, if something goes really bad customers might not be so good at "blameless postmortems" if they have a name to blame.

That is why we went with initials. And I hope customers understand the blame is with all of us, starting with me. Not with the person in the arena. https://twitter.com/sytses/status/826598260831842308

Re: GitLab Database Incident – Live Report

#43
post #40
post #7

"So in other words, out of 5 backup/replication techniques deployed none are working reliably or set up in the first place."

Does this mean whatever was in that database is gone, with no available backups? Is this an SOA where important data might lie in another service or data store, or is this a monolithic app and DB that is responsible for many (or all) things? What was stored in that database? Does this affect user data? Code?

We have snapshots, but they're not very recent (see the document for more info). The most recent snapshot is roughly 6 hours old (relative to the data loss). The data loss only affects database data, Git repositories and Wikis still exist (though they are fairly useless without a corresponding project).

Re: GitLab Database Incident – Live Report

#44
post #14
post #9

23:00-ish YP thinks that perhaps pg_basebackup is being super pedantic about there being an empty data directory, decides to remove the directory. After a second or two he notices he ran it on db1.cluster.gitlab.com, instead of db2.cluster.gitlab.com Good lesson on the risks of working on a live production system late at night when you're tired and/or frustrated.

Good lesson on making command prompts on machines always tell you exactly what machine you're working on.

This doesn't really help if there are multiple production databases. It could be sharded, replicated, multi-tenant, etc.

Re: GitLab Database Incident – Live Report

#45
post #14

Earlier quoted context omitted.

Good lesson on making command prompts on machines always tell you exactly what machine you're working on.

I like to color code my terminal. Production systems are always red. Dev are blue/green. Staging is yellow.

I use iterm2's "badging" to set a large text badge on the terminal of the name of the system as part of my SSH-into-ec2-systems alias:

    i2-badge ()
    {
      printf "\e]1337;SetBadgeFormat=%s\a" $(echo -n "$1" | base64)
    }
It's not quite as good as having a separate terminal theme, but then I haven't been able to use that feature properly. :(

Re: GitLab Database Incident – Live Report

#46
post #18
post #9

23:00-ish YP thinks that perhaps pg_basebackup is being super pedantic about there being an empty data directory, decides to remove the directory. After a second or two he notices he ran it on db1.cluster.gitlab.com, instead of db2.cluster.gitlab.com Good lesson on the risks of working on a live production system late at night when you're tired and/or frustrated.

Also, as a safety net, sometimes you don't need to run `rm -rf` (a command which should always be prefaced with 5 minutes of contemplation on a production system). In this case, `rmdir` would have been much safer, as it errors on non-empty directories.

Or use `mv x x.bak` when `rmdir` fails

Re: GitLab Database Incident – Live Report

#47

Earlier quoted context omitted.

I think it's a staff member. Can't remember first name, Yuri maybe, who is fairly active with the project.

Nope, that would be me.

Sorry for the rough night Yorick. This could happen to all of us but of course it happens to the person that is working the hardest. <3

Re: GitLab Database Incident – Live Report

#50
post #40
post #7

"So in other words, out of 5 backup/replication techniques deployed none are working reliably or set up in the first place."

Does this mean whatever was in that database is gone, with no available backups? Is this an SOA where important data might lie in another service or data store, or is this a monolithic app and DB that is responsible for many (or all) things? What was stored in that database? Does this affect user data? Code?

The doc says that there is a LVM snapshot being 6 hours old. And there should be a regular logical backup with at most 24 hours age as well (they just can't find it for whatever reason). (Scratch that, my doc did not update, despite Google saying it should automatically update).

Regarding what's gone: The production PostgreSQL database. This suggests that the code itself is fine, but the mappings to the users are gone. But git is a distributed VCS after all, so all the code should be on the developer's machines as well.

Post reply on HN