puppet notes

January 14th, 2010

There is one note that I came across that probably explains some unusual intermittent problems I’ve seen with puppet. “If you update the config and do not restart puppetmasterd and that new config is invalid puppetmasterd appears to serve up the previous version of the config that it knew worked.” So the workflow looks like this: you update the config, restart puppet on the node, nothing changes, you get confused, mess around with the config, then maybe restart puppetmasterd, then eventually it works. The key is to tail the puppetmasterd logs when you see some unusual behavior, and maybe also tail the puppet log on the client. There will typically be some relevant error message, or at least an unexpected change in behaviour (’huh, why does the node think it no longer has a defined config?’).

I also came across a couple of ‘chef vs puppet’ blog posts. One was posted on the puppet-users mailing lists and did not draw any criticism there, not surprisingly. The blog commenters were less forgiving and did a good job of convincing me that the post was not well-written. Some of the comments are worth reading though. The second post is also well written: Puppet vs Chef, and discusses the differing underlying philosophy of the two tools.

I have to say that I agree that the more advanced pre-requisites for Chef make it less appealing to a sysadmin, or even to a non-Ruby developer. It sucks having to know how to configure and run Merb and OpenID just to try the tool out. The comparison of Nagios and Puppet is an apt one, I think; we sysadmins are OK with arcane configuration syntax, so long as it’s well-documented and examples are easy to find.

A new tool that is intended to sound totally awesome is Foreman, but to me it sounds a lot like Cobbler + Puppet, which is what I used to use before I gave up on dealing with “automatically managing” my DNS, DHCP, TFTP configs. Except here you have the additional hassle of having a working Puppet stack and maybe a working Passenger install before you even start up the tool. I’m quite alright with just writing my /etc/ethers and /etc/hosts and /tftpboot/pxelinux.cfg/default by hand.

What is Google Wave?

December 5th, 2009

The big problem with Google Wave is the ambiguous naming. You see statements like “wave is like e-mail, but better”, or “wave is a protocol like SMTP”. Neither is quite right, and people get frustrated by the fact that the basic concepts of Google Wave are opaque. Let’s try to figure it out.

E-mail.
When we say “e-mail”, we often mean a set of technologies and pieces of software that implement those technologies. But sometimes we mean the “e-mail messages” themselves. “wave” is just that ambiguous.

With e-mail, we have the message itself, then the MUA, the MTA, the IMAP server, maybe the POP3 server and the mail store (mbox or Maildir or PST or Exchange). We have the “message headers”, we have the SMTP “message envelope”. And, of course, we have some supporting infrastructure like DNS MX records and URI schemes. The Wikipedia page on “e-mail” does a great job of describing the details.

Wave is at least that complicated.
With wave, we have the wave itself (which is kind of like a “message”), then we have the wave client (which is kind of like a MUA), then we have the wave server (which is kind of like an MTA), and the server is also storing the wave, so it’s also like a mail store and POP3/IMAP server. Google describes waves as “equal parts conversation and document”, and it called its server wave.google.com, and it called its client Google Wave, which doesn’t help!

Let’s start from the beginning again: a “wave” is a hosted XML document that lives on a server. The “wave” consists of “blips”. The “wave” has “participants” in that wave, and the participants may have access only to certain blips and not the whole wave. Each blip can be edited by the participants at any time, and the full revision history is kept.

The above paragraph doesn’t sound too bad, but there are still questions. What’s a “wavelet”? What’s “Wave Federation Protocol”? What wave clients are available? Wave servers? With that, we’re off to read the spec and the guide.

That’s not quite right!
Turns out, “waves” are comprised of “wavelets”. “Wavelets” are comprised of “blips”. The contents of “blips” are called “documents”. Each wave is hosted by a particular server. Each wavelet is hosted by a particular server (not necessarily the same one as the one that hosts the wave). “Federated” is a fancy word for “shared”. Not all wavelets are federated.

A “wave provider” operates a “wave service”. The service consists of a “wave store” and a “wave server”. And if they named it something other than ‘wave’, sentences like this would be easier to parse:

Typically, the wave service serves waves to users of the wave provider which connect to the wave service frontend

There are also “gadgets” and “robots”. A robot is an automated participant, and can do anything that a human participant can do. A gadget is a piece of code that participants can interact with, within the wave.

Here’s another great article that’s one level higher than what I wrote:
An Introduction to Google Wave - Google Wave: Up and Running

In conclusion, it’s important to separate the UI of the Google Wave client from the underlying concepts of the Google Wave platform. Just like your preview pane layout in Mozilla Thunderbird has nothing to do with how “e-mail” works, the way the Google Wave client shows bolding and wave structure is not helpful when trying to figure out the difference between a wavelet and a blip.

extract pages from a PDF

November 16th, 2009

Suppose you have a book or technical manual in PDF format, many hundreds of pages long. You want to send someone just a few relevant pages. the pdf toolkit to the rescue:


sudo aptitude show pdftk
sudo aptitude install pdftk
pdftk Desktop/sg246363.pdf cat 102 103 output Desktop/result.pdf

Ubuntu on HP Mini 2133

September 25th, 2009

I guess it’s officially called “HP Mini-Note PC 2133″ : http://h40059.www4.hp.com/hp2133/

A couple of good sites dedicated to this netbook:

Both have active forums. And of course, ubuntuforums is always a good source of help.

I’ll try installing 9.10 alpha 6 on this machine shortly.

rename (1) is different on Debian vs RH

September 21st, 2009

Crazy! The Debian one is better, of course :)

debian-box# rename --help
Unknown option: help
Usage: rename [-v] [-n] [-f] perlexpr [filenames]

vs

rh-box# rename --help
call: rename from to files...

The Debian one is the one that takes standard Perl regexes (and is in fact a simple Perl script).

need to disable “visual effects” to get some old X apps to work in Ubuntu

September 8th, 2009

This is Ubuntu 9.04 (x86_64). I had Visual Effects turned on because I have a newish nVidia card, using the proprietary nVidia drivers. Trying to use IBM’s “Storage Manager 10″ aka SANtricity, you get just blank windows for some of the windows. The workaround is System -> Preferences -> Appearance -> Visual Effects -> None

Now the windows show up in all their asstastic X11 motif glory.

what is “sustainability”?

April 21st, 2009

Treehugger has a story talking about the over-use of the word. “sustainability” seems to be going the way of “green” and “organic”, vague feel-good terms without a specific definition.

I started this blog in the beginnning with the intent of writing about “sustainable computing”, but of course, that is a meaningless term, thus the number of posts I’ve written on the topic (0).

If you go with the classic definition of “sustainability”

Development that meets the needs of the present without compromising the ability of future generations to meet their own needs.

then computing as we know it today cannot be sustainable until all of the components of our computing environment are fully recyclable and do not use more energy than necessary. OTOH, today’s dirty wasteful computers are a very valuable tool that can be used towards a “sustainable” goal.

on wiping hard drives

March 10th, 2009

I’ve always used the excellent Free Software called DBAN to erase old hard drives before either giving them away or recycling them. DBAN complies with the government regulations that are designed to prevent data recovery, without destroying the hardware itself. GNU Shred can do the same on the file level, if you want “secure erase file” functionality.

The general belief is that bits can be recovered from the drive, in theory, even after being overwritten with zeros, because of some remaining magnetic forces or something like that. So if a foreign govt is after your data, better safe than sorry and melt that thing down.

In practice, though, the established data recovery companies probably have more advanced technology than the govt. And I’ve used DriveSavers and the like to recover data off dead HDs. I think once it was fried electronics, and another time a bad motor or something. At $2k per disk, it was not cheap, but they got the data back. Of course, in both cases, it was hardware failure that prevented me from reading the drives, and not any deliberate erasure of the data.

So I was surprised to learn that there isn’t a data recovery company that can get your data back if you go and overwrite it with some zeros. Here’s an active challenge: http://16systems.com/zero/

So I guess this means I no longer need to make a DBAN CD when erasing disks, but any LiveCD at all will do just fine.

Ubuntu Home Server

February 19th, 2009

Aim for feature parity with Windows Home Server. Aim for lower price.

Need to spend more time on differentiating the exact goals. WHS has many more features than a Drobo and yet even getting Drobo-level functionality is tough with Ubuntu (specifically hot-swap drives and online resizing). Try to explain ‘resize2fs’ syntax to your parents :)

One advantage over Drobo is the FS size limitations: http://www.drobospace.com/blog/entry/11516/Q-amp-A-About-Using-Drobo-s-Large-Volume-Sizes/

Another advantage over Drobo is performance.

An advantage over WHS? That’s a tough one. However, WHS is not designed for use with Ubuntu desktops. So it’s more like “WHS is great given everyone is using Windows.” Just like Time Machine and Time Capsule are awesome if you’re already using a Mac. UHS needs to be great _given_ that everyone is using an Ubuntu machine already. Centralized file store, centralized backups are key.

Using GNU Screen

February 13th, 2009

I already have one previous post about GNU Screen, but I came across a couple of more good tutorials:

The screen-users mailing list looks to be an excellent resource as well.