On testing

Last fall, I wrote a completely new configuration parser for OpenPAM Lycopsida. Although the new parser was far more robust than the one it replaced, it was large, unwieldy, and suffered from a number of issues relating to whitespace handling, which stemmed from reusing some old code which unfortunately was thoroughly documented and therefore could not be easily modified. So I decided to rewrite it again, from scratch this time.

Then I did what I should have done last fall but didn’t: I wrote some unit tests. And of the first dozen or so tests I came up with, three failed, revealing two different bugs—one of them fairly serious.

There’s a lesson in here somewhere…

Downtime

I haven’t been able to read email sent to des@des.no or des@freebsd.org for five days, due to a series of unfortunate incidents involving dodgy power supplies and the fragility of ZFS boot in FreeBSD. Work and other duties prevented me from addressing the issue in a more timely manner, but I am now regaining control. Luckily, neither my ~30 GB IMAP spool nor any other data was lost, nor did my backup MX bounce any mail. My IMAP server is now back up with a small UFS SU+J boot / root partition instead of ZFS. I am still unable to read email, but that should be fixed within 24 hours.

I also uncovered an annoying but luckily not fatal bug in the Cyrus IMAP server. When TLS is configured, the IMAP daemon stores state for each TLS session in a DB file. If that file is corrupted, the server will start, but it will refuse any incoming IMAP or LMTP connections, and will instead spit out a stream of completely unhelpful error messages. The only recourse is to delete the TLS session state database; I set up an rc script to do that at boot time, so hopefully this won’t bite me again.

Dear Members of Congress

The Internet’s resilience and ability to heal itself and work around intentional or unintentional damage are the stuff of legends. As with most legends, however, it is only partly true. Key components of the Internet’s technical infrastructure are still, to a large degree, and despite repeated efforts to decentralize them, concentrated in and controlled by the United States.

As a non-US resident who makes his living largely from the Internet, I am extremely pleased to see that the United States House of Representatives has recognized this weakness and is considering decisive measures to remedy the situation. Continue reading “Dear Members of Congress”

ZFS-to-ZFS backups

ZFS has a couple of very useful functions, zfs send and zfs receive, which allow you to serialize a complete ZFS dataset and recreate it in a different location. They can also be used to serialize a delta between two snapshots and apply that delta to a previously created copy of the dataset. You see where I’m going with this… That’s right, incremental backups of a ZFS dataset or even an entire pool to a different ZFS dataset or pool. Continue reading “ZFS-to-ZFS backups”