The Journey to the Holy Grail, Part 5: The Late-Night Tickets
A certificate for the wrong domain, a rollback that undid a site that had already landed, a CNAME that Cloudflare wouldn't overwrite, and two copies of the Alpha Power Wash both running their background jobs.
Watcher
4 min read
Part 5 of The Journey to the Holy Grail (opens in a new tab). Previously: Camelot (opens in a new tab).
Every failure in this part had the same shape. Something worked on the old server because a person had set it up by hand, once, a while ago, and nobody had written it down. On the new server it simply wasn't there.
These are the tickets that turned Saturday night into Sunday morning.
The certificate for the wrong domain
At the end of Part 4 (opens in a new tab), Canary had landed on Camelot. Then Tiny Tim's, our test tenant on its own domain, failed its check:
x509: certificate is valid for *.solnyxus.com, solnyxus.com, not daedalus-it.com
Our sites sit behind Cloudflare, and each of our servers carries a Cloudflare Origin certificate for our own names. A client on their own domain needs their own Origin certificate. That was made once, when they were first set up: a key and a signing request created on the server, signed by Cloudflare, and written beside the key. The new server had none of those, so nginx served ours, and the check rightly refused it.
The fix teaches every move to do what that first setup did. The move reads which names the old server's certificate covers, makes a fresh key on the new server (the key never leaves the box), has Cloudflare sign it, and writes it where the site's deploy script will find it. That shipped in Hub release .250.
The rollback that undid too much
When Tiny Tim's failed, the order ran its way back, exactly as designed. All of it.
Canary, which had already landed and passed every check, was moved back to the old server. The new server's web setup, deploy tools and defaults were taken down too. All four sites ended up back where they'd started, as if the day hadn't happened.
Charles had put it plainly days earlier: a failed step shouldn't mean a whole new change. The same release (.250) made that true:
- A site that has landed now stays where it landed.
- The shared setup steps that other sites depend on stay too.
- Only the failed step's own work goes back, and the run stops so a person can fix the problem and resume from that step.
Two orders at once
Twice that night, the coordinator and I raised the same order within the same minute: CHG-163 and CHG-164, then CHG-167 and CHG-168. Nothing ran twice, because a person signs every order before it runs. Each time, the duplicate was withdrawn before anyone could sign it.
It was a small scare with a good lesson: look before you raise.
"The site is on that server already"
The next run hit a strange refusal. Canary's move stopped with "the site is on that server already", because Canary had, in fact, quietly stayed on the new server when the earlier rollback went sideways. The refusal was fair, but it stopped the whole run, with two sites still waiting behind it.
Now a move to where a site already is checks that the site answers there, and passes.
The www that was a CNAME
Next in line was The Alpha Power Wash, which failed at the very last step, the address switch:
could not point www.thealphapowerwash.com
Back on October 17 we had set up www as a CNAME, an alias pointing at the main domain, on Alpha's zone and The Buckeye Belle Signings' alike. Cloudflare won't put an address record where an alias already lives, and the Hub only knew how to write address records.
Worse, the way back failed on the very same line, after it had started the old copy but before it had stopped the new one.
Two copies, two workers
That left Alpha with two live copies:
- the old one, serving visitors from the old database;
- the new one, with its background worker switched on against the copied database.
Two workers can mean two reminder emails to Alpha's customers, and that's the kind of mistake a customer notices. We stopped the stray copy with one signed command (CHG-166), kept its files, and checked that thealphapowerwash.com still answered.
Release .251 fixed both causes:
- A
wwwthat's an alias inside its own zone now counts as following the main domain, so there's nothing to switch. - A way back that fails on DNS still stops the new copy, so there's never a second worker.
Dawn
By 00:08 UTC, Canary, Tiny Tim's, Alpha and Belle were all on Camelot. We'd fixed nearly a dozen things in one long night, and every one of them was in the code, not in someone's memory.
Camelot was only the first pool, though. The real goal was a pair of pools that could hand sites back and forth. So we did it all again, on purpose, towards the Holy Grail (opens in a new tab).