Hmmm. How do I do this?

Ok, picture a network with one “controlling computer”, which I’ll call “the CMS”, and a bunch of satellite computers which I’ll call “the CPs”. These satellite computers live in projection booths in a theatre and have digital projectors hooked up to them, but that’s not important. The problem I’m dealing with is upgrading the machines from version 3.3 of our software to version 3.5. The software upgrade also necessitates an upgrade from RedHat 7.3 to CentOS 3.4.

I’ve got the upgrading of the CMS sorted (I have a non-bootable DVD with an apt repository with CentOS 3.4 and our software, and a kickstart file that does the upgrade without touching the partition with our data on it).

The CPs have hostnames of cp1 to cpN, and IPs of 192.168.30.101 and up. cp0 (192.168.30.100) is reserved.

What I’m working on now is upgrading the CPs. What I’ve been doing is making the CMS a PXE boot server, and wiping the boot partition on the CPs one at a time, re-installing them as cp0 and then when it comes back up, ssh-ing in and restoring the backed up configuration, including the hostname and IP.

The problem with that is that it takes 20 minutes per CP, and the powers that be are complaining that it takes too long. They’d like something more parallel.

So I’ve been thinking of retrieving the MAC addresses of each CP before I upgrade. Then I do them all in parallel, and use the MAC address afterwards to figure out which one is which. I understand that I can use “arp -a” to retrieve the MAC addresses. I’m wondering if there is something I can do to DHCP to give out the correct 192.168.30.1xx address to the right machine, or whether I should have DHCP hand out addresses in some other range, and then use “arp -a” again to find which machine has which address and fix them one at a time?

Damn you, Linode

For the second weekend in a row, my linode node has died. This time, the linode.com web site is down as well. From what I can glean from the linode IRC channel (which isn’t on linode), about half of their servers are dead to the world.

For me, that means no outgoing email, no mailing lists, and of course my hosted web sites including navaid.com are all down. This sucks.

Last week’s outage was caused because some clueless tech at ThePlanet, which is the colo where their servers live, moved some power connections around (after being explicity told not to touch anything) and overloaded a power supply. That took several hours to resolve.

Update
It’s up again, after only 6 hours. Geez, this sucks.

Six Approaches in Six Months

It’s that time again, time to reset the clock on my instrument currency. Just about every time I go on a flying trip, I manage to get some actual IFR en-route, usually only for a few minutes here and there, but in the last 6 months I’ve only done one real approach, and of course no holds. In order to stay instrument current you have to have done a hold and 6 approaches in the last 6 months, plus “intercepting and tracking course through the use of navigation systems” (which is pretty hard to avoid if you’ve done the other bits), and since I plan to fly up to Ottawa for Canada Day weekend, I need to be current in case I do get some weather.

I wasn’t interested in doing any non-precision approaches. Ottawa and Rochester both have ILSes and frankly the whole “currency” thing is more of an exercise in being legal than in safety. (Before our trip out to Mt. Holyoke this fall I’ll probably practice a few non-precision approaches because I don’t remember what approaches they have at Barnes Muni .)

So I filed ROC-GEE-ROC, and flew out to the Geneseo VOR and did a hold there. No problem, they assigned a hold on the airway I was already on, so the entry was dead simple. One turn around, and I was ready to come back in. I asked for the ILS 28 approach.

The controller descended me to 2,500 feet and vectored me for the approach course. My first approach wasn’t bad, but wasn’t great. Both horizontal and vertical I kept within 2-3 dots. And when I “broke out” at decision height I was a bit south of the runway.

The next two approaches went much better. Vertical I kept within the donut, and horizontal I went out a dot, or a dot and a half maximum. Although I still ended up a little bit south of the runway each time.

The next approach, I got a new controller. He vectored me further out, made me to descend to 2,100 on the final turn, and then asked me to keep my speed up. I did, and I actually did a pretty good approach. Kept it in the donut both horizontally and vertically almost the whole approach.

I’m not sure what went wrong in the last two approaches. Maybe it was the new controller (who kept giving me the descent at the last turn, but started turning me in nearer and giving me an abrupt turn-on), maybe it was the fact that I adjusted the DG for precession, maybe I was overconfident, and I was trying to fly them fast again, or maybe I was just bored and tired. But both approaches I was hitting 3 or 4 dots deflection horizontally both to the left and the right. And on the final one, I couldn’t get it slowed down for the landing. After I got touched down, I couldn’t even seem to put much pressure on the brakes, and very nearly decided to go-around. I ended up rolling into the overrun area on runway 28, which is 5500 feet long.

Getting spammed in earnest now

After I moved my blog from MoveableType to WordPress, it seemed that the comment spammers couldn’t find my new blog. For a while there, it even seemed that referrer spam had dropped down to nearly nothing. But they’re back, with a vengeance. They’re still trying to spam my old blog which doesn’t exist anymore, and Maddy’s blog which doesn’t accept comments any more, but now they’re spamming my blog. Or attempting to, anyway. SpamKarma is catching them all, but right now it’s catching 20-30 comment spams a day.

It’s a frustrating waste of my time and resources. I don’t pay for disk space and network bandwidth so that these vandals can use it up.

Obviously there’s something wrong with the way I’m profiling perl scripts

I’m trying to reduce the memory foot print of my waypoint generation scripts. In order to see how much memory they use, I’ve been doing a (ulimit -v NNNN; ./CreateCoPilot.pl ….) and adjusting NNNN up and down to bracket where it fails due to lack of memory. I’ve had two problems with that:

  • The break point isn’t constant – a number will work on time and give me an out of memory error on the next run.
  • The numbers are nothing close to what I’d expect.

That second problem is the worst. Near the end of my script, after generating this huge (15,000 record) array of references to hashes, I sort it using the following code:

my $recordsArrRef = $self->{records};
my @newrecs = sort { $a->{waypoint_id} cmp $b->{waypoint_id} }
@{$recordsArrRef};
$self->{records} = \@newrecs;

It appears that at one point, there should be two arrays with 15,000 records in them, and yet when I benchmark the one where I’ve commented this code out against the one that has it, the unsorted one only saves 350 bytes. Ok, maybe it’s sorting in place, and all I’m saving is the actual code. Or maybe that isn’t the point of maximum memory usage. So then I looked in the Palm::PDB code, which is a library from somebody else. And at the end, after getting this array of hashes together, he goes through the array and encodes each one into binary, putting that into a different array. AHA, I thought, that means I’ve got the array of hashes and an array of encoded data records. Maybe what I should do is shrink the array of hashes as we build the array of encoded data. So I changed

foreach $record (@{$self->{records}})
{
...
$data = $self->PackRecord($record);

push @record_data, [ $attributes, $id, $data ];
}

to

while (defined($record = shift(@{$self->{records}})))
{
...
$data = $self->PackRecord($record);

push @record_data, [ $attributes, $id, $data ];
}

and I seem to have saved over 5,000 bytes. Not bad. But I think the has *got* to be a better memory profiling tool for Perl. Time to hit CPAN, I guess.