09 November 2008

9:44 PM Term::VT102 0.91
It's been a while, but now there's a new version of Term::VT102. A few people have contacted me about the module over the past few weeks, and then Jörg Walter sent a patch to fix Unicode handling, which resurrected my interest in clearing a few of the TODOs from the list.

So, I cleaned it up a bit and extended the example scripts enough that I could effectively use Term::VT102 as a terminal emulator, and ran things like top and mutt within it to see how it handled. As a result I've fixed a few bugs in escape sequence handling and line wrapping as well as adding TAB stop support and callbacks for title changes and other private message strings.

There is also now an example script to show scrollback buffer processing for things like converting script logs or screen history into a flat file you can read with less without all the cursor positioning stuff getting in the way.

Labels:

25 June 2008

11:47 PM Server move and upgrade
Recently I moved this web server's services from London to Dallas, which meant building a new installation pretty much from scratch. So instead of being based on a very creaky initial base of Red Hat 7.3, customised and running under UML, it's all now running on CentOS 5 under Xen.

Last night I upgraded the virtual hosts to CentOS 5.2, which went reasonably smoothly, so tonight I went ahead and upgraded the "real" host as well. That didn't go so well. On rebooting, everything came back up, but I couldn't route to any of the virtual hosts any more.

It seems that the updated version of Xen had modified some scripts which meant I ended up with two bridge devices - my old one, virbr0, containing all of my virtual hosts and an alias for the real host, and a new one, xenbr0, containing a renamed version of the raw Ethernet device plus one more interface I've blotted from my memory. For some reason this caused all of the iptables DNAT rules to fail to work. SNAT / masquerading for outbound connections worked fine, but inbound data would only go in; the responses wouldn't go back out.

Anyway, if you are trying to get Xen working again after upgrading and are seeing mysterious DNAT failures, try applying these two patches:

--- /etc/xen/scripts/network-bridge.rpmnew 2008-06-21 23:09:32.000000000 +0100
+++ /etc/xen/scripts/network-bridge 2008-05-20 21:14:32.000000000 +0100
@@ -110,8 +110,7 @@
ip addr show dev ${src} | egrep '^ *inet ' | sed -e "
s/inet/ip addr add/
s@\([0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+/[0-9]\+\)@\1@
-s/${src}/dev ${dst} label ${dst}/
-s/secondary//
+s/${src}/dev ${dst}/
" | sh -e
# Remove automatic routes on destination device
ip route list | sed -ne "

--- /etc/xen/scripts/xen-network-common.sh.rpmnew 2008-06-21 23:09:32.000000000 +0100
+++ /etc/xen/scripts/xen-network-common.sh 2008-05-20 21:14:32.000000000 +0100
@@ -120,12 +120,7 @@
ip link set ${bridge} arp off
ip link set ${bridge} multicast off
fi
-
- # A small MTU disables IPv6 (and therefore IPv6 addrconf).
- mtu=$(ip link show ${bridge} | sed -n 's/.* mtu \([0-9]\+\).*/\1/p')
- ip link set ${bridge} mtu 68
ip link set ${bridge} up
- ip link set ${bridge} mtu ${mtu:-1500}
}

# Usage: add_to_bridge bridge dev

I've not looked into why it works; the above is just a reversion to the scripts as they were before upgrading to xen-3.0.3-64.el5_2.1, and it works for me, so I'm happy.

Labels:

03 May 2008

9:41 PM Cat bed
To help me to learn about basic woodworking I thought I'd have a go at making a little bed for the cats, based on an article I saw in Make: magazine about a Swahili bed that uses straps. Unlike that one, mine doesn't repel bedbugs, but I suppose it could if I soaked the straps in salt water for a while.

After a lot of faffing about, the cats now have a bed.

Sometimes they even deign to use it. (Pictured is Tomsk, but Ash uses it too).

Kirsten prefers it more!

If I were to do it again I would bear in mind a few lessons:

All that said, it takes my weight without complaining, so the design seems sound. Also those straps are pretty comfortable to sit on. For reference though, that size of bed (about 65x45 cm) took 25m of strapping to build.

06 April 2008

7:47 PM Pesky cats
In our house we have a pair of stair gates, so that Kirsten can't wander up or down the stairs unattended. They are about Kirsten height; easily jumped by the cats.

At least, the bottom one is. The top one, our smaller cat - Ash - can pass because she can both jump over it and, to get down again, squeeze under it. Unfortunately she's a right pest at night, scratching on the wardrobe doors or (if we shut the bedroom door) the bedroom door itself. This keeps me awake, though of course everyone else sleeps through it. To cut a long story short, I needed a door on the stairs to keep the damn cat off my door.

So the challenge was to alter one of the stair gates such that Ash couldn't pass it and it was still usable and safe. The first attempts did not go well. It turns out that cats are really, really good at getting past obstacles. When I made changes to the bottom gate, she even managed to squeeze through its bars, bypassing all my additions, until I wove string across them - which she eventually learned to pull down out of the way...

Pipe insulation, lots of string, dowel rods and spare bits of wood on the top gate and so far so good. Except that she sits on the second top step and yowls for 10 minutes when I go to bed. Still better than scrapes in my door, and at least I learned about lashing bits of wood together.



While Caroline's been busy acquiring stash, I've also been learning about basic carpentry, currently mortice and tenon joints and tonight especially about where not to leave my fingers when using a chisel. Oops. At least they're all still attached, if a bit ... gappier ... in places than before.

06 March 2008

7:30 AM PV 1.1.4
I've finally got around to releasing version 1.1.4 of PV. Elias Pipping and Patrick Collison have been sending patches to improve compilation on Mac OS X, and there are a couple of minor cleanups: left-over IPC resources are cleaned up on termination thanks to Laszlo Ersek, and if you supply a non-numeric argument to an option that needs a number, you now get an error thanks to Boris Lohner.

Incidentally I did finish that toy garage in time, just forgot to update here. The lift needs a bit of work still - some sort of ratchet is needed, as it just slips at the moment. But the rest of it is in active service.

Labels:

23 December 2007

11:59 PM Garage nearly done
But I'm almost out of time. I still need to touch up a little of the paint inside the lift at the bottom, add a handle of some sort (still not sure what) to the spindle at the top of the lift, and screw the helipad / lift roof on to the top of the lift.


Since kerbs have been added to the top level, some of the black around the edges needs touching up too. I don't think that's going to be possible though, since I'll only be able to do it in the evening and the black paint has an 18-hour drying time.

22 December 2007

7:24 PM Garage update
Last night I painted the top level, which took forever, so I didn't have time to do the helipad - that will have to be done later. It ended up looking like this:



Today, as planned, I was left to my own devices so I could get the pieces cut out for the lift. Naturally, it rained, so out came the tarpaulin again to make my back yard into a makeshift tent.



After a lot of back-and-forth between the garage inside and the jigsaw outside, the pieces were finally cut into something approximating a reasonable fit.



Originally I had planned to use no screws or nails at all in construction, to minimise risk if someone fell on it, but I couldn't think of any sensible way to attach the lift walls to the supports in a reasonable timeframe, so I ended up using a small number of tiny wood screws. I would expect the lift itself to break away from the garage first if someone fell on it rather than pulling the walls off the lift, and even if the lift was pulled apart, the screws are all going into solid timber so they're unlikely to become exposed.

As well as the lift walls, I also used screws in the lift itself. I decided that only using glue to hold the floor of the lift on was asking for trouble, so the floor and ceiling are screwed into corner dowel rods. The walls will be glued to the outside of the dowels once they're painted. In the meantime the lift looks like a little cage.

Here's the lift shaft partially assembled, with the front sat next to it.



Now I have to paint everything. I may put a sign saying "LIFT" above each entrance, I'm not sure yet. All of the lift parts need painting, and of course the helipad does too, and also I need to fill the dowel holes on the underside of the garage and repaint it. So far the lift looks like this - everything has to be done in stages since I can't paint all sides of an object at once. Pesky gravity.



Once all of the paint has dried, I can glue everything together, glue the roof on, glue the whole lift to the garage itself, and then all I have to do is work out how to make a handle for the crank thing at the top and in theory it's finished.

2 days left.