A few months ago, when Mac OS X Lion came out, I tried installing it on the Mac Mini in the living room. It failed. Miserably. After a couple of hours of trying different things (including making a bootable USB installation disk) I gave up, since it had thankfully not horked the Snow Leopard install. Life went on.
I had hoped that a newer release might have fix the issue, which was apparently related to having the internal disks in a RAID set. The symptom is that Lion would boot and get stuck with a rolling candy bar. With 10.7.2, I still had issues. I went brave and decided to nuke the internal drives (which required some diskutil CLI love in the form of having eraseDisk go on both internal drives for a few minutes, enough to remove the RAID metadata). Progress ensued.
But then got the cryptic, unhelpful, and decidedly generic “There was a problem installing Mac OS X. Try reinstalling” message.
What?!
Oh well, nothing the Googletron couldn’t take care of.
And so another Lion cub is roaming the house, stuck in the living room, restoring entertainment media.
A couple of weeks ago the Mac App Store featured a calendar app I had not seen before: BusyCal. It’s the gorgeous, customizable and very usable desktop calendar that iCal should have always been. Highly recommended.
It’s hard to believe it has almost a year since we started the process of open sourcing tools, but it has indeed been that long, and it picked up steam a few weeks ago, when pushed out nddtune, which is admittedly a very simple tool. Today we’re continuing that effort with a couple of more significant tools: Zettabee and Theia.
A Little History
About four years ago, we had a very real need to have fairly detailed performance metrics for NetApp filers. At the time, the available solutions relied on SNMP (NetApp’s SNMP support has historically been weak) or were NetApp’s own, which, asides from expensive, were hard to integrate with the rest of our monitoring infrastructure (which is comprised of Nagios and Zenoss). As such, we set out to write a tool that would both perform detailed filer monitoring (for faults and performance) and that would be able to interface with those systems. Theia was born.
In more recent times, as we were looking at beefing up our DR strategy, we found ourselves needing a good ZFS-based replication tool, and set out to write Zettabee, which gave us an opportunity to dive deeper into ZFS capabilities.
Let the Games Begin
Today we’re very excited to be releasing those two tools into the open. Theia has been in production for the last four years, dutifully keeping an eye on our filers, while Zettabee has been pushing bits long-distance for well over nine months. We are working on putting together a roadmap for future work, but are happy to have them out in the open for further collaboration. Tim has written a good post on some of the work he has done to make this happen, and I am grateful for his help on this endeavor.
NRPE running under Solaris SMF control.
The SMF manifest:
<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<service_bundle type='manifest' name='export'>
<service name='application/monitoring/nrpe' type='service' version='0'>
<single_instance/>
<dependency name='fs-local' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/system/filesystem/local'/>
</dependency>
<dependency name='network-service' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/network/service'/>
</dependency>
<dependency name='name-service' grouping='require_all' restart_on='none' type='service'>
<service_fmri value='svc:/milestone/name-services'/>
</dependency>
<instance name='default' enabled='true'>
<dependency name='config-file' grouping='require_all' restart_on='refresh' type='path'>
<service_fmri value='file://localhost/usr/local/etc/nrpe/nrpe.cfg'/>
</dependency>
<exec_method name='start' type='method' exec='/local/lib/svc/method/nrpectl start' timeout_seconds='30'>
<method_context working_directory='/var/tmp'>
<method_credential user='nrpe' group='nrpe' privileges='basic,sys_resource,!proc_info,!file_link_any' limit_privileges='basic,sys_resource,!proc_info,!file_link_any'/>
</method_context>
</exec_method>
<exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'/>
<exec_method name='refresh' type='method' exec='/local/lib/svc/method/nrpectl refresh' timeout_seconds='60'/>
<property_group name='nrpectl' type='application'>
<propval name='NRPE_CFG' type='astring' value='/usr/local/etc/nrpe/nrpe.cfg'/>
<propval name='NRPE_FQB' type='astring' value='/usr/local/sbin/nrpe'/>
</property_group>
</instance>
<template>
<common_name>
<loctext xml:lang='C'>NRPE</loctext>
</common_name>
<documentation>
<doc_link name='nagios.org' uri='http://nagios.sourceforge.net/docs/nrpe/NRPE.pdf'/>
</documentation>
</template>
</service>
</service_bundle>
The associated method:
#!/bin/sh
. /lib/svc/share/smf_include.sh
NRPE_FQB=`svcprop -p nrpectl/NRPE_FQB $SMF_FMRI`
NRPE_BIN=`basename $NRPE_FQB`
NRPE_CFG=`svcprop -p nrpectl/NRPE_CFG $SMF_FMRI`
pid=`pgrep -x -d " " $NRPE_BIN`
case $1 in
'start') if [ -z "$pid" ]; then
smf_clear_env
$NRPE_FQB -c $NRPE_CFG -d >&2
if pgrep -x -d " " $NRPE_BIN >/dev/null 2>&1; then
:
else
echo "NRPE failed to start" >&2
exit $SMF_EXIT_ERR_FATAL
fi
else
echo "NRPE already running (pid=$pid)" >&2
exit $SMF_EXIT_ERR_OTHER
fi
;;
'refresh') if [ -z "$pid" ]; then
echo "NRPE not running; nothing to refresh" >&2
exit $SMF_EXIT_ERR_OTHER
else
pkill -x $NRPE_BIN
fi
;;
esac
exit $SMF_EXIT_OK
Season to taste.
With the deployment of the MacMini3,1 as an important box, I wanted to have timely backups and easy recovery, and that is one thing Snow Leopard does rather well with TimeMachine. Attach a disk, configure as a TimeMachine destination, and done, right? Not exactly: I noticed that TimeMachine was only backing up the system if there was a user logged in, something that’s rather rare on this box (in fact, there is generally no display or keyboard attached to it).
It turns out that this is normal behavior, as the system unmounts all external volumes when a user logs out, including TimeMachine volumes (this does not apply to network volumes, just volumes physically attached to the system). There are some edge cases that affect somewhat this behavior (such us when FileVault is in use), but it can be completely disabled:
defaults write /Library/Preferences/SystemConfiguration/autodiskmount \
AutomountDisksWithoutUserLogin -bool true
I went ahead and rebooted the system. TimeMachine now works even when users are not logged in.

A few months ago the aging Early 2009 Mac Mini in the living room was replaced with a 2010 model. The old one was having a hard time keeping up with HD content (mainly in terms of performance but also flat out refusing to display iTunes HD content after the upgrade to Snow Leopard) and the 1080p display over the DVI to HDMI adapter over-scanning issues were rather tiresome. The 2010 model did away with all that: faster CPU, more memory and native HDMI took care of those issues, which left a perfectly functional Macmini3,1 searching for a mission in life, a mission I had found even before I pulled the trigger on the new model.
A small server in the office that I use to store backup copies of precious data away from my main desktop system, such as music and photos, is also the authoritative repository of software that gets pushed to all the other systems I use or care for. Additionally, it runs a small mail setup (mx + imap) for two personal domains and other bits of useful software, such as a personal wiki. It was been working flawlessly for quite some time, but I have been wanting to reduce the office’s power footprint, especially while I travel, which was challenging given the system needed to be up all the time.
Thus, the mission is defined: the Mac Mini needs to take over the services that run continuously so the other system can be powered off at will.
The migration is nearly complete: mail is flowing and the software repository is up to date. The wiki bits are still a work in progress, but those are not as critical, primarily because Evernote has largely replaced (and enhanced) the wiki use. None of this would have been possible without the MacPorts Project community, at least not as fast and seamlessly as it has been. So there is happiness in the living room and there is happiness in the office.
On other related news, the aging PowerBook5,8 is finally headed for retirement. It has been a good 5+ years run, but in the end, it was entirely too slow now that its last user had embraced digital photography and was using quite heavily. I’m not sure what I will do with it: the recycling center should be its final destination, but there is an emotional link to that laptop that keeps me from doing it. It was the first laptop I bought at Ning (before we actually purchased Apple products at the office) and it has served us very well.
Safari 5 Reader it’s the shitznutz! I love it.
Or so iTunes tells me. No, this isn’t a rant about DRM, iTunes, Apple or anything along those lines. Ranting requires energy, and I rather devote it to more productive matters. I prefer, as the saying goes, to “vote with my wallet”.
A couple of months ago I went on a limb and purchased a HD movie from the iTunes Store, mostly as an experiment. After checking out the goods, I decided I probably would not be buying any more movies, given subtitles (which are generally a strong requirement for a multi-lingual household) are not available. But I wasn’t ready for the surprise of not being able to watch said movie with or without subtitles at all. It turns out that now that I have upgraded my desktop system (which has a Mini Display Port), the movie will simply not play. Jemery Horwitz has a write up on why this is the case. This is annoying, especially given the fact that the system is Apple branded end to end.
I said this wasn’t a rant on DRM, and it isn’t. I subscribe to the mantra of use what works for you, and this doesn’t work for me, so my response is that I will not be buying any movies. I will live, and the $15 I spent on the movie will have to do for SD (vs HD) for that one movie. Live and learn.
Dumb.
Although I am not a full-time developer, I do deal with a fair amount of information that benefits from the joys of versioning (including software I write). A lot of that work today happens in an IDE (Xcode), but a lot of it happens in other contexts, so having a pretty (and above all, useful) tool to navigate a repository is quite useful. I have been using Versions for the Mac since it was beta, and it has proven to be a worthy helper. Recently, I ran into Cornerstone, and I decided to try it out of curiosity. Both are solid apps, and either one will service your SVN needs nicely. Hopefully Git will get one in the near future.