Building a small Linux cluster is a lot simpler than I thought it would be. That said, there are a number of snags and pitfalls along the way, and it’s hard to find a comprehensive and up to date set of instructions online. There are also different approaches, either doing everything manually or using a system such LTSP. This post describes my experiences setting up a cluster manually.
After spending a long time trying to work out why some pings were randomly dropped between hosts on different segments of a virtual LAN connected by a transparent IPsec VPN tunnel, I discovered that the MTU for the underlying connection on both ends of the VPN should be set the same. The default for ADSL is usually 1492, whereas 1500 is frequently used for other connection types such as cable or fibre. When I changed the settings at both ends to 1442 (allowing some overhead for IPsec) then the random ping loss stopped.
This particular quirk of Python has been discussed in various places before, but I think it bears repeating as it’s different to the behaviour that you might intuitively expect and consequently catches a lot of people out when writing class methods. When declaring a function or a class method, any default arguments are only evaluated at the point when the function is declared, not when the function is called. For mutable default arguments such as lists or dictionaries, this has the effect of making them static. Consider the following example:
I just spent a couple of hours debugging something really counterintuitive, where PHP’s
print_r seemingly told me that an array had different content to the content that the same array contained according to a
foreach loop. Consider this slightly contrived example code:
In this post I describe how to link together IMAP email, ownCloud calendar and contacts, Roundcube contacts, and set up access to all of them via any mobile device that supports ActiveSync. They don’t all need to be on the same server, but you will need to use the same username and password for IMAP and ownCloud.
In this post, I describe how to override the default rsyncd settings on a Synology diskstation to enable custom daemon mode modules/shares that don’t require user authentication.
In this post, I describe how to troubleshoot and fix an issue with some shared webhosting plans, which causes PHP to return a 403 Forbidden or 404 Not Found error for files that are actually present and readable by all users.
In this article I describe how to configure Z-Push to use a Roundcube contacts database to allow synchronisation of contacts on a smartphone or tablet using ActiveSync.
My past self would be sad and amazed if he could see me how lazy I’ve become. I have a printer plugged into my laptop which runs on Xubuntu but I wanted to be able to print from my iPad while I’m on the sofa downstairs.