Clones, Doppelgängers, Threads and Slaves: Notes On MySQL Replication

Notes on MySQL replication terminology, how to interpret the results of SHOW SLAVE STATUS and SHOW MASTER STATUS, and how to correctly configure replication for new slave and master hosts in your MySQL clusters.

Note that the technical details of e.g. cloning a MySQL server aren’t covered; let’s consider them left as exercises for the reader.



I’ve migrated my blog to Hugo! Let me know if you find anything broken, or missing, or ugly.


Reed Kraft-Murphy on #meta,

Mitigating CVE-2014-6271 "shellshock" in lighttpd with mod_magnet

Quick braindump:

  • a remote code vulnerability (CVE-2014-6271) in bash has been disclosed
  • bash will parse any environment variable value which begins with () { as a function, and continue parsing and executing any shell commands it encounters
  • env x='() { :;}; echo vulnerable' bash -c "echo" will print “vulnerable” if your bash is vulnerable
  • lots of Internet facing services put strings from requests into environment variables
  • curl -A "() { :; }; touch /var/www/oh_hai_webroot" http://eg.your.webserver/cgi-bin/foo.cgi

Backup and other file rotation in Python

Write programs that do one thing and do it well.

So I finally tired of implementing file rotation and retention functionality for backup scripts on an ad-hoc basis, and have sorted it out forever*.


Reed Kraft-Murphy

Fabric, Python and remote running scripts

As a systems administrator, I occasionally need to run a script on a number of machines, be it to diagnose an intermittent issue, gather some ad-hoc statistics, or what have you. As such I have a small library of scripts, each with an aptly-named Fabric task defined in a fabfile. Of course, each of these tasks is almost identical: copy script to remote server, run (either as a regular user, or as root). I finally tired of repeating myself, and decided to solve this once and for all (obligatory xkcd).

To wit: presenting a Python snippet for turning a directory of scripts into remote-running Fabric tasks. Like magic.


Reed Kraft-Murphy

Google retiring Google Reader - where to now?

Google today announced that they’re retiring Google Reader, as of July 1st this year, as part of their spring cleaning. While the reason given for the closure is that “over the years usage has declined”, this move leaves the (few?) die-hard Google Reader users out in the cold. So, where can we go from here?

As a fairly heavy Reader user (Since April 15, 2009 I have read a total of 80,084 items), Reader had become central to my web browsing habits. The keys features, for me, that Reader provided were:

  • Handling many hundreds of feeds
  • Syncing read status across multiple clients
  • Supporting grouping of multiple feeds into categories

So keeping these in mind, I’ve found the following potential alternatives.


Reed Kraft-Murphy