Search Results: "mt"

16 May 2007

Adeodato Sim : Better sorting of maildirs in the Mutt browser

I’ve been always dissatisfied with the sort_browser=date option in Mutt, particularly when dealing with maildirs. For me, the reasonable behavior is to sort by the newest entry under the new/ directory, so that reverse sorting places the maildirs with most recent mails first. There is a patch by Dale Woolridge to address this issue, but since it only looks at the mtime of the new/ directory, once new mail has been read in a maildir, it still stays on the top of the list. So for me, the solution was to write an external program that would sort the list of maildirs by the date of the most recent new file, and have mutt read that list. Maybe you find it useful as well.

MJ Ray: Bad Tech: Stupidity: Government and Free Sofwtare

Apparently, yet another NHS IT project has tanked. Steve Purkiss wrote in:
"I've just written an article on the latest debacle in our Government's long line of software failures, and how a switch to Open Source would provide a far better solution all round. I would be extremely grateful if you could help by digging it: http://digg.com/linux_unix/The_MTAS_debacle_Even_more_reasons_to_switch_to_Free_Open_Source_Software Thanks!"

15 May 2007

Benjamin Mako Hill: Selectricity

/copyrighteous/images/selectricity_logo.png
More than a year ago, I published an election methods library called RubyVote. Interest in the library surpassed any of my expectations: I know of at least one startup using the library heavily in their core business and a number of fun sites, like Red Blue Smackdown, that are using it as well. The point of course, was to make complex but superior election methods accessible in all sorts of places where people were making decisions suboptimally. It its own small way, it seems to have succeeded enormously. Over the last year, I've been asked by a variety of people if they could use RubyVote for their own organizational decision making -- tasks like electing leadership of a student group or members of a non-profit board of directors. Since RubyVote was just a library without a UI of its own, I had to tell them "no." I caved in eventually and got to work on a quick and dirty web-based front end to the library. That project grew into Selectricity which is a primarily web-based interface to a variety of different election methods and voting technologies. You can currently try out quickvotes which can be created in half a minute and voted on in a quarter but which bring all of the power of preferential voting technologies to bear on very simple decisions. Prompted by Aaron Swartz, I also built a mobile phone version that's lets you send a short email or SMS to create or vote in a election. For those that follow research in voting technologies, there's not a lot of new stuff here. What's new is that this project, unlike the vast majority of voting technologies, is interested in the state of the art for everyone but governments. Clearly government decisions are important but they're one set of decisions, usually only once a year. Selectricity is voting machinery for everything and everyone else. It was announced in a variety of news outlets today that Selectricity was selected for grant from mtvU and Cisco as part of their Digital Incubator project. As part of that, I'm going to be working with some other voting technology experts to bring tools for auditable elections, cryptographically secured anonymity, and voter verifiability to the platform (I have only rudimentary functionality today). There are a couple people who will be joining me on the project this summer and we will building out what I hope will be an extremely attractive platform for better every-day decision-making. More than the grant though, I'm excited about the visibility that use by MTV will bring to the project. Most of all though, I'm just excited about more free software and more (and more accessible) democratic decision making. My adviser Chris Csikszentmih lyi put it well:
One of the big arguments against preferential voting, or new voting technologies, is the fear that they would disenfranchise the average person who doesn't yet understand how they work. Certainly, making all voting technologies open source is critical, but the issue of familiarity is worth considering. We re hoping that MTV and eventually American Idol will move their voting over to Selectricity, allowing it to work as both a technical tool but also pedagogically, training future voters. Why not integrate democratic processes into all your software and communications tools? Why not use the best democratic processes available, so long as they're available to everyone?

10 May 2007

Piotr Roszatycki: Test::Unit::Lite

I like very much a Test::Unit framework. I've found it as a very handy tool for organising the tests. I really don't like the standard Test::Simple and its deriveratives. I don't understand why I have to see the output for each failed test. I rather like the do-or-die tests grouped logically as test units. Somebody write me a note for Exception::Base module that it depends on non-core Perl modules. It is not for runtime but build dependency. Even that, it is true, because Test::Unit is a somewhat heavy module and it depends on i.e. Errors. I decided to reimplement Test::Unit. So it is available Test::Unit::Lite already! It is much lighter replacement for original Test::Unit. It should be compatible for existing test suites. The intention was possibility of bundling the Test::Unit::Lite with other module distributions:
$ perl -MTest::Unit::Lite -e bundle
It copies the Test::Unit::Lite module to the inc directory in the distribution source. The Test::Unit module isn't perfect. The most annoying behaviour is the random order for calling test cases. The Test::Unit::Lite sorts the function names and calls it always in the same order. There is not so many Perl modules distributions that use Test::Unit. I hope a little that my package could change this situation and the test units will be more popular and easier to use.

8 May 2007

Martin F. Krafft: Linux pains #517: unregistering network devices

Somehow my network device does not want to recognise that it actually has a carrier. This being Linux (and not Windows), I thus decide to reload the driver, after taking down the network interface:
lapse:~# ip l dev eth0
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:0a:e4:30:43:16 brd ff:ff:ff:ff:ff:ff
# notice: not UP
lapse:~# rmmod e1000
lapse kernel: unregister_netdevice: waiting for eth0 to become free.
  Usage count = 1
lapse kernel: unregister_netdevice: waiting for eth0 to become free.
  Usage count = 1
[...]
# goes on forever, uninterruptible; thus new shell:
lapse:~# ps u -C rmmod
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root      5624  0.0  0.0   1656   480 pts/2    D+   00:02   0:00 rmmod e1000
As we all well know, state 'D' uninterruptible sleep means: reboot. Especially since I cannot ssh into the box anymore (doh!), and su and sudo just end up in state 'D' as well, if I try them. So, on to reboot. Or wait, that doesn't work as the shutdown process will hang long before the filesystems get unmounted. Great. It's become impossible to argue that Linux is the more stable operating system Update: a few people responded with workarounds, ranging from use of watchdog to automate the reboot (this is my laptop, so it's not really necessary) to various combinations of flags to /sbin/shutdown or the use of sysrq to force the system to reboot without cleaning up or unmounting filesystems essentially the same as pressing the reset button. Ben Hutchings says:
I think this happens when the driver repeatedly attempts to fix an error condition and keeps scheduling future work (retaining a reference to the device) rather than giving up.
I thus ended up filing a bug against the kernel.

Evan Prodromou: 17 Flor al CCXV

Had a great day yesterday. It was 20C outside in Montreal, so Maj and I had a bunch of friends over for "Sunday brunch" (at 3PM). I call it "bruncher", as a twist on diner and souper, lunch and dinner in Quebecois French, respectively. Our friends Patti and Meg, Anne-Marie and Jeff, Tobias and Cato, Heather and Damien, John Usher, Niko, and Maj's sister Lori were all there. I fired up my grill and made shrimp skewers, tuna burgers and salmon burgers (courtesy of the president), and tofu sausages, as well as corn on the cob. I prepped up a big green salad and a pasta salad, plus cheese and bread and chips and fresh guacamole. Topped off with a lot of vinho verde and the tasty EXP from Toasted Head, and we had a pretty nice meal. Oh, and John brought a pineapple, and we had berries and ice cream and watermelon for dessert. Nice. tags:

Montessori This morning Maj and I went to visit a potential pre-school and day-care centre for Amita June. It's the Outremont Montessori school, which was pretty nice inside and had a friendly staff. My three brothers and I were all taught using the Montessori method, and my mother is a Montessori instructor, so I'm probably a little picky about Montessori schools. But the Outremont one is bilingual, and they have all the Montessori method equipment, and a real commitment to it. The main thing I'm concerned about is that the teachers aren't AMI trained, as far as I can tell. They do a two-month workshop in the method, whereas AMI-trained teachers have one- or two-year degrees. I think we're going to check out the program and enroll Amita June for the day care (which is less intensive than the pre-school) and see how we feel about it. That is, if we get in: they've got a full school right now, but they might be able to put us on the waiting list. tags:

Plattsburgh International I'm pretty excited about the incipient opening of Plattsburgh International Airport, which calls itself "Montreal's U.S. Airport" (really!). Plattsburgh lies right across the New York (state) border, about 100km from Montreal and about a one to two hour drive depending on border crossing times. The clear market is for Montrealers seeking discount flights to (other) destinations in the USA. I think that's going to require significantly cheaper flights than are available at Trudeau Airport. Fortunately, that might not be that hard -- Trudeau is really lacking in cheap fares. But will the new airport's fares be cheap enough to justify driving an hour and crossing a land border? I'd be surprised. (via montreal city weblog, which is awesome.) ddf says: Sure, it's a bit of drive. But consider the fact that border customs is way less of a pain than airport customs. I think if you are traveling with a lot of bag and don't want to risk some extensive search before being able to board in Montreal, it might be worth the drive. tags:

7 May 2007

Clint Adams: Cheryl is the daughter of an MTA worker

She invented summer camps, and he gave birth.

Pete Nuttall: Online Shopping

Dan has been complaining I haven't been ranting enough lately. I have been waiting for the Scottish elections to sort themselves out, because thats a nice mess and easily due some ranting. However, given the need for a placeholder, I wrote this little moan on the subject of internet shopping. Everyone knows that the future of shopping is online. Every year, more money is spent online. Christmas last year was marked by getting a few parcels a day from amazon. However, I find it fraught with all things of annoying problems. Over the last few days, I have attempted to buy a t-shirt and a bottle of whisky online, while buying a pair of sandals and a book offline. While the wo aren't the same, it was still instructive as to the problems of internet shopping. Taking money from shoppers. To actually take money from people has to be the most important part of running any sort of shop. However, it is someone hard for me, the shopper, to give websites my money. Consider the example of Geekz Shop. To pay them, it appears I need to have a paypal account[0]. On examining the paypal signup page, I see references to the FSA. While its good that Paypal are actually registered and regulated these days, it does strongly suggest that they are a bank, and as such opening a account with them is the same as opening a bank account with HSBC or someone. In other words, I need to open a new bank account just to buy a t-shirt. Thats a lot of hoops to jump though. In their defense, they did offer a collection of other ways to pay when emailed about it, but its still a lot more work than walking into a shop and giving them cash. In more general terms, as a shop, its important to make it as easy as possible for your customers to give you money. Its common to outsource this to someone else, but any general solution serving lots of sites will suck[2]. Of course, doing it yourself means you are stuck dealing with credit cards - which is a pain, or BACS which is a joke. Oh well. The next issue you have is giving people their goods. In a real shop, you hand them their goods and they carry it away (massive generalization). Unless you are selling somthing completely electronic, for example domains, then you have to get the goods to the person. Once again, running your own service is hard - far harder than your own online payment system. However, it and your website is the thing people see of your shop. The classic problem is late delivery. You have to make some sort of claim as to when goods will arrive, but getting it wrong will result in arguments. My best example of this is a christmas present bought off amazon last year - it arrived in January, despite amazon's claim of having it to me before christmas day. The other classic example of getting it wrong is the apple store. It doesn't quote a delivery time - instead it quotes a "ready to ship" time. This is the time needed for apple to put your purchase in a box and stick a label on it. The problem with this is that your poor customer thinks that his new mac is going to show up in a couple of days. It doesn't, so he is massively disapointed. You've disapointed the guy before your product has left your warehouse. Thats one step aay from employing a bouncer to beat your customers when they leave your store. Having thought that delivery problems are an issue, consider people returning stuff. If its hard, they just moan at their credit card company. If your support and sales folk are in a call centre and can't be reached, then they spend the next week explaining to their mates about how dire you are and why they would sooner deal with the devil than you. Oh, and neither email nor rt is a way to deal with this. The final problem with most online shops is usability. Usability is hard - full stop. Its harder to sell something when the customer can't pick it up and feel it. While some shops are quite good, the number that force me to think when filling out the checkout forms or looking for products is amazing. Its like they don't want my custom. From this, I have claimed that a good online store needs a good way to take money off customers, a good way to get goods to customers, a sane way to deal with problems and a usable website (Next week, I'm going to blog about how water is wet). However, lots of sites, including big ones, fail at this. I don't think internet shopping is going away, but I do think that the shops that fail to take money off folk, that have sites that can't be navigated, that give goods to couriers who "lose" them, will go out of business. I hope that most shops steadily improve on these areas, just so I spend less time being pissed off at them BTW: this post was inspired by my mother's attempts to buy photos of my graduation online (no - it hasn't happened yet). The site in question was apparently so confusing that she has given up and has asked me to buy them. Sorry for ranting.

6 May 2007

Andree Leidenfrost: Etch Upgrade - Sweet As

I upgraded my little file & print server and firewall (in UML) VIA C3 box on the weekend.

Everything went perfectly smooth, it even worked to upgrade via the apt-proxy that's running on the box. Super cool!

The only issue I had was non-working HTTP connections via my Telstra Bigpond cable connection after the upgrade of the firewall UML. In the end I fixed it by forcing the same MTU on the cable-facing as on the LAN-facing interface. It may be related to NAT, but it worked with the same 2.6.18 kernel before the upgrade, so maybe it is an iptables thing.

Evan Prodromou: 15 Flor al CCXV

Today is my one-year blogging anniversary. I started this blog on Journal/15 Flor al CCXIV, kind of trepidatiously and with ambiguous intentions. Now, a year later, I feel much more confident in the format and clear in my purpose. I've varied between an almost maniacally consistent one-post-per-day regimen to a more impressionistic, when-I-feel-like-it once-a-week schedule. I'll admit that I'm happier with the more frequent update schedule; I feel like I deliver more to the reader that way. I think the main thing I've enjoyed from having this blog has been the personal satisfaction in frequent and informal writings on my own schedule and to my own whim. Working with wikis makes a lot of my life about careful collaboration and consensus gathering, and having a place where I can speak out with my own voice on my own thoughts is really refreshing... and addictive. Most of all, I've enjoyed how having this blog has connected me with new people, and with friends I already had, in new and different ways. This year of blogging has been contemporaneous with a deepening of my connection with the Montreal technology community, and I can't help but think there's some causation involved. I think that my blogging is bringing me into a common medium and a common language with a group of people I want to spend time with. I've had some side effects I didn't anticipate, either. My family has started reading this blog, which means they know how I'm doing and what I'm up to more often than when I do once-a-week phone calls. And my more extended family -- aunts, uncles, cousins -- also read regularly. I can only wonder what they think about my complaints over various, say, Scheme module formats, but they seem to like it, too. Even Maj's mother reads it (hi Rita!). I think that m-c's 10 reasons to blog really hold true for me; it's good reading with a year's perspective behind me. I'm looking forward to the next year and what it has in store. tags:

Great day It was actually a great day for a blogiversary. Last night, Maj went out with her friend Sam for Sam's birthday, so this morning Amita June had a very quiet breakfast and then went out to Best Buy to do some shopping. I just bought a Canon MP600 printer, and toner cartridges weren't included in the package, so I had to go buy more. (Later, while configuring the printer, I found the toner packages in the bottom of the box. D'oh!) Amita fell asleep on the way home, so I just dropped her in bed. Maj and I walked through a brisk but sunny Montreal weekend afternoon down to the me dia offices, where Creacamp was already in full swing. There were lots of old friends and new ones, and the offices were light and airy and nicely connected. There was a talk by Guylaine Couture about her painted books, and by Luce Beaulieu about her awesome codesigner business, POSCH. Both really interesting. Of course my favourite talk was Anne-Marie's, about her great video series Music Spins the World (or La musique spin le monde). It's an incredible first-person series about her travel adventures with various rockstars to obscure and dangerous parts of the globe. A-M is becoming quite the rock diva, but I'm glad she's staying down-to-earth about it. You can check her work on 33mag.tv. Tonight I had a great time, too. Alex Roberts and Jon Phillips of Creative Commons are in town for the awesome Libre Graphics Meeting being held at the cole Polytechnique this weekend. The event seems great -- bringing together developers from all the great Open Source/Open Content graphics projects together in one room to talk. Jon and Alex met me and Niko at Concordia to see the Montreal premiere of the Helvetica movie. Helvetica is a great documentary about the history of this ubiquitous, unassuming font that epitomizes the modernist view of typography and design. The movie gives Helvetica a personality all its own, and in the process explicates the history of graphic design over the last fifty year. It also introduces us to a rogue's gallery of design and typography legends, all of whom are amusingly and passionately opinionated about design in general and Helvetica in particular. It has that characteristic of great documentaries: it illuminates the camera obscura of global culture through the pinhole of its narrow subject, a single font. Incredible. After the movie the four of us went to La Banquise, the landmark 24-hour poutine parlour right near my house. Alex and Jon indulged deeply in the local specialty -- they each got poutines with lots of bacon and ground beef -- and we all chatted about San Francisco, Web culture, Creative Commons and the cast of characters that surround it. A great, fun time. tags:

5 May 2007

Joey Hess: fog on Roan

I'm up at the top of Roan Mtn this morning in solid fog, all hazy white after 20 feet. No chance of the views I came up here for, but hiking up from the pass was still worth it, in the calm and chill. Nice end to a quick camping trip.

4 May 2007

Evan Prodromou: 14 Flor al CCXV

Tomorrow is my 1-year anniversary for having this blog. I started it with a post on Journal/15 Flor al CCXIV, and tomorrow is the same date, one year later. There's a lot going on on that day, though! First, it's Free Comic Book Day. That means you can walk into any participating comic book store and walk out with a free comic book. Cool! I'm going down to my nearby comics store, the small and cool Millenium. But there are more in the area, so I made a My Maps of Montreal comic book stores participating in Free Comic Book Day. My Maps is pretty boss. Second, tomorrow is the launch of the Design Montr al. Montreal was recently named a UNESCO City of Design, and tomorrow designers in Montreal will be opening their doors to the public. It seems like it should be a pretty fun event, with a wind-up party at the SAT. Cool. I'm going to be going to Creacamp, the new BarCamp-style event we have in Montreal to showcase creative women d'ici. It may be one, two, or three of us coming (Maj and Amita June are still on the fence), but I'm definitely going to come. tags:

3 May 2007

MJ Ray: Crackers: Evil Mambots and a com_extcalendar exploit

A couple of hours of today went on dealing with the effects of a big spam attack on a managed server. One user had installed the Joomla ExtCal component on their web site, while another reported that email was running slowly. The attacker was exploiting com_extcalendar/admin_events.php to send spam and trying to send 9000 emails meant they hit the maximum permitted sending rate quite quickly. As soon as I spotted it, I shut down outgoing mail, killed the sending process, disabled the exploited site and component, cleaned the spam from the queue and restarted mail. I'm searching the rest of the server for any other com_extcalendar installations and then I should contact the other exploited servers I've seen during this attack. It looks like there's an entire class of evil "Mambots" out there, using exploitable Mambo and Joomla sites to crawl in search of others. I don't think the exploited site's owner will be billed for the clean-up, because I can't find a security advisory for this. Neither the mambo site (whose site search doesn't work for me) nor the joomla site seems clear about security alerts. I didn't find a third-party advisory that was clearly about this (but there were a few maybe-relevant ones). The homepage at Mambo last released in 2005 and doesn't mention this in its release notes, while the homepage listed by Joomla 404s (and I don't enjoy using the Joomla site because, as it says,
"we are aware, and regret, that our website does not comply with many WCAG/508 requirements"
). If you are using com_extcalendar on your site, check whether it's safe, or replace it with a better calendar.

1 May 2007

Russell Coker: more about Heartbeat

In a comment on my blog post “a Heartbeat developer comments on my blog post” Alan Robertson writes:


I got in a hurry on my math because of the emergency. So, there are even more assumptions (errors?) than I documented. In particular, the probability model I gave was for a particular node to fail. So the probability of either of two failing would be double that, and either of three failing would be triple that. Note that the probability of multiple simultaneous failures goes up as a power, but the probability of either of only goes up linearly. I really need to sit down and do the math carefully - but the idea of the simultaneous failures going up as a power is true. And the “any of” probability goes up linearly. That’s also true. This is why people can actually use larger HA clusters ;-). The 5 years figure is the industry standard quoted figure for an average Intel-based server to fail. The four hours to repair is a common high-quality of service response time from a hardware vendor. I admit that’s not the same as actual repair time, but if some “repairs” are just reboots, then it’s not a horrible number to start with - if your vendor has cached some spares nearby. I suppose I should sit down and do the math right, and make a spreadsheet of it. (I wonder if I remember that much math?) I assume disk failures are taken care of by hot swap disks, RAID, etc. and so in effect they “never fail” (at least not totally) so that these failures don’t have to be accounted for by the overall availability model. Here’s an intuitive way of thinking about it “from your gut”… If I took your whole data center and made a cluster out of it, what’s the chance that at least half of your servers would fail at once? Pretty darn small, is the short answer ;-). If it’s not pretty darn small, you need to buy better servers, and IBM has just the servers for you ;-). Or maybe they need to hire a better SysAdmin ;-) If you ask yourself “when is the last time at least half my machines in my data center couldn’t communicate with the other half”, then hopefully that’s also a “pretty darn small” chance too. If not, there are well-known methods for making networks highly reliable too. [I’m still ignoring “catastrophes” that you haven’t accounted for in your HA architecture]. I’m not saying this is free, and it can be pricey. One of my other favorite sayings is “Paranoia is an expensive hobby”. How much do you want to spend? You tell me how much you want to spend, and you can figure out how to spend it. I’ll make a separate comment on quorum models later. It’s getting late here.

My only comment in response to that is to say that I still believe the calculations of probability to be correct in my original post and I am interested to see someone prove otherwise. Another comment by Alan:


Data corruption, no doubt, is almost always much worse than loss of availability. And some kinds of data corruption are worse than others. For example, mounting a non-clustered shared disk filesystem twice simultaneously is usually much worse, than updating two replicas of the data simultaneously. In the first case, you have to restore to your previous backups and lose all data since then. In the second case, you only lose updates that were made to one of the sides, and you instantly have a working copy of the data which is nearly always much newer than your last backup (with the possibility of recovering them by significant effort). Typically you would only lose a few minutes of updates at worst - and depending on the kind of networking failure, you might not lose anything. Heartbeats certainly aren’t enough. You need to monitor the health of your servers and the health of your applications. Heartbeat monitors applications and can easily be informed of and act on the health of your servers (with release 2 style Linux-HA Heartbeat configurations).


Followed by:


Since data corruption is so serious, this is why cluster designers worry so much about split-brain, which is managed using the ideas of quorum and it’s sibling fencing. This is all about keeping bad things from happening. This post is really about quorum, since Russ had expressed interest in it. Quorum is the idea that you can uniquely choose a subcluster to represent the whole cluster in those cases where communication failure has caused the cluster to split into separate sub-clusters which cannot properly communicate with each other. In this way, only one of the subclusters continues on, and the others will sit on their hands and do nothing waiting for a person to fix things. Some of the kinds of quorum mentioned below are better than others. But, most importantly, they can be used in combination as described later. The most common kind of quorum is that Russ mentioned in his earlier post - the majority quorum. In this method, for a cluster of n nodes, you grant quorum to a sub-cluster which has more than INT(n/2) members. This means that if you have a 3-node cluster, you have to have two nodes to continue. If you have 4 nodes, you have to have 3 nodes to continue. For 5 nodes, you have to have 3 nodes, and so on. Other basic methods include disk reserve, so that you have reserve a disk to have quorum. In this case, if only one node survives and it can reserve the disk, it continues to run. However, the disk becomes a single point of failure. This may not be a problem if this single disk is required to run any of the cluster services, since they would fail without it anyway. [Heartbeat does not support this method]. An analagous method is to implement a software resource which grants quorum to one subcluster in a fashion analagous to the disk reserve method. This has the advantage of not requiring disk reserves, or a shared disk, but it has the same SPOF disadvantage as the disk reserve method. Heartbeat does support this method using the quorum daemon. It’s incredibly useful for those cases (like split-site clusters) where you cannot use fencing. Another method is to grant quorum to any subcluster which can ping a certain set of nodes, and not grant it to any which can’t access those nodes. This isn’t a wonderful method, and has obvious disadvantages with respect to uniqueness, and single points of failure. (Heartbeat doesn’t yet implement this one). Another method is to grant quorum to any node which is a member of a 2-node cluster. This is better than losing quorum and stopping when one node stops, but obviously completely ignores the uniqueness requirement of quorum. Another method is to ask a human being if you have quorum. This is hardly an ideal circumstance, but useful in some contexts as described below. (Heartbeat doesn’t yet implement this one). Perhaps you say, really the only one of these that’s really good is the first one - the majority vote method. And, I would generally agree with you. But, Heartbeat has the ability to use these in combination which makes some of those methods that seem flaky to be much more reasonable. Heartbeat has the ability to have multiple quorum modules declared, and they’re used in this way: Any module can return HAVEQUORUM, NOQUORUM, or TIE. If they return HAVEQUORUM or NOQUORUM, then no further quorum modules are consulted. However, if they return TIE, then the next quorum module is consulted for its opinion. If the last quorum module returns TIE, it is treated the same as NOQUORUM. This enables you to use one quorum module to break the tie declared by a previous quorum module. You could then use the quorumd to break the tie created by a voting module. Or you could use the quorumd instead of the “two-node” module. Or you could use the “pingable” module instead of the “two-node” module. Or you could at the end always tack on a “human” module, in case all else returns TIE. This is kind of cool, actually. My favorites for next implementation are the pingable and consult human modules. And, of course, if your cluster loses quorum due to real server failures failures, there are always ways to work around it, with a little human intervention. One method is to tell Heartbeat to ignore quorum. Another is to tell Heartbeat to remove certain nodes from the cluster, after you verify that they’re really dead. And, I’m sure that in a pinch, some new methods will be invented. And some of them might actually work ;-).


Regarding the quorumd, it seems that this is an extra server that will generally run on another machine separate from the rest of the cluster. So if we had a two-node cluster with a quorumd then it would effectively be a three-node cluster where one node is not configured to run any resources. It seems that the simpler approach in many cases would be to merely have a three-node cluster with resources not configured to run on one of the nodes. For example if I was running a mail server cluster for an ISP I might configure a three node cluster of the two mail server back-end machines and one other machine that is lightly loaded (EG a DNS server) and have it configured not to run MTA resoures on the DNS machine.

30 April 2007

Cord Beermann: Listmaster vs. Gmail

We get regular requests from Gmail-Users that don't receive their own mails back, when they post something on a mailinglist to which they are subscribed.

So if this happens to you, first check if your mail shows up in our mailarchive.

If it appears there (wait some time that the archive can catch up) your mail has been successfully posted to the list, and your copy has also been send and is most likely accepted by Gmail. But Gmail seems to drop that mail internally (or sort it in a spamdropbox?) maybe because From and Receipient-address are the same. (We get two or three requests of that kind per week, and everytime we investigated, we found this is the case)

If it doesn't appear in the Mailarchive and your mail has been accepted by our mailserver murphy.debian.org, you most likely have lost against our Spamfiltering. (Did you know that ControlExtension matches the string Rolex?).

Then feel free to report to listmaster@lists.debian.org and provide as much info about your lost mail as possible, helpful would be:



Keep flamemailing.

25 April 2007

Marc 'Zugschlus' Haber: Automatic Wikification of Configuration Files

In the company I work for, most documentation is maintained in Word format. Except mine. I have a dokuwiki and am thankfully allowed this exception as I am the only Linuxer in the company. Since Windows systems need external documentation (being hindered by the absence of commentable text configuration files), there is a policy that all configuration data needs to be explicitly documented. I hate that idea, since documentation is always outdated, and documenting configuration changes doubles the work that needs to be done. After finding out that dokuwiki has a command line interface, I implemented a mechanism that can run from cron and keeps wiki pages of configuration files up to date on an automated basis. On the target systems (the ones that need to have their configuration documented), I installed a script which generates a tarball containing the relevant configuration files on standard output. For more sensitive data, the script could do some basic sanitazion such as removing passwords from the configuration files before putting them into the tarball. On the system running the cron job, the following script runs:
#!/bin/bash
set -e
set -C
set -u
JOBNAME=“update-wiki-firewall-config”
DWPAGE=“php4 /usr/share/dokuwiki/bin/dwpage.php”
TMPBASE=“/tmp”
SSHID=“$HOME/.ssh/$USER-passphraseless-$(hostname)”
REMOTEHOST=“remote.fqdn.example”
REMOTEJOB=“pull-netfilter-init-config-tar”
SHAREDIR=“$HOME/share/$JOBNAME”
WIKINAMESPACE=“pointer:to:namespace”
start=’/*BEGIN generated firewall rules */’
end=’/*END generated firewall rules */’
insert=’/*INSERT generated firewall rules */’
umask 077
if ! TMPDIR=“$(mktemp -d $TMPBASE/fwconfig.XXXXXXXXXX)”; then
        echo >&2 “ERR: cannot create temp dir in $TMPBASE”
        exit 1
fi
cd $TMPDIR
mkdir remote
ssh -i $SSHID root@$REMOTEHOST $REMOTEJOB   \
 tar --extract --gzip --file - --directory remote
mkdir workdir
touch workdir/rulelistfile
echo “$start” >> workdir/rulelistfile
for fwfile in $(find $TMPDIR/remote/rules/up -type f   sort); do
  MTIME=“$(stat --format=”%y“ $fwfile)”
  PROSEEXPLANATION="$( $fwfile sed -n '/^#::#/ s/^#::#[[:space:]]*//;p;q; ')"
  if [ -z "$PROSEEXPLANATION" ]; then
    PROSEEXPLANATION="netfilter-init internal code"
  fi
  rm -f workdir/newwikipage
   $SHAREDIR/wikipagetemplate \
    sed \
        -e "s PLHfilenamePLH $(basename $fwfile) " \
        -e "s PLHproseexplanationPLH $PROSEEXPLANATION " \
        -e "s PLHmtimePLH $MTIME " \
        -e "/PLHcontentsPLH/r$fwfile" \
        -e "s/PLHcontentsPLH//" \
  > workdir/newwikipage
  WIKIPAGENAME=“$WIKINAMESPACE:regeln:$(basename $fwfile .rul)”
  $DWPAGE checkout $WIKIPAGENAME workdir/wikipage
  if ! cmp --quiet workdir/wikipage workdir/newwikipage; then
    cp workdir/newwikipage workdir/wikipage
    $DWPAGE -m “new contents imported from $fwfile” commit workdir/wikipage $WIKIPAGENAME
  fi
  echo “  * [[$WIKIPAGENAME $(basename $fwfile)]] - $PROSEEXPLANATION” >> workdir/rulelistfile
done
echo “$end” >> workdir/rulelistfile
$DWPAGE checkout $WIKINAMESPACE workdir/contentspage.txt
 workdir/contentspage.txt \
  sed -e "\ ^$ start//\\*/\\* \$ ,\ ^$ end//\\*/\\* \$ d; "   \
  sed -e "\ ^$ insert//\\*/\\* \$ rworkdir/rulelistfile" \
  > workdir/newcontentspage.txt
if ! cmp --quiet workdir/contentspage.txt workdir/newcontentspage.txt; then
  cp workdir/newcontentspage.txt workdir/contentspage.txt
  $DWPAGE -m “new contents page” commit workdir/contentspage.txt $WIKINAMESPACE
fi
cd /
rm -rf “$TMPDIR”
Yes, this needs some more documentation and generalization. But it’s just a proof of concept that needs some polishing before being put into real life use. Here are the two template files for wiki page and contents page:
====== Firewallregeln PLHfilenamePLH ======
Last changed on target system: PLHmtimePLH
PLHproseexplanationPLH
<code>
PLHcontentsPLH
</code>
===== Dump of firewall rules =====
/*INSERT generated firewall rules */
/*BEGIN generated firewall rules */
/*END generated firewall rules */
The index page template relys on the HiddenComment dokuwiki plugin to be installed, or the placeholders show up in the rendered wiki page. The code uses the first comment line marked with #::# to generate a short explanation of the file being pulled into the wiki. dwpage.php is a fully-fledged command line interface to dokuwiki, committed new pages are fulled versioned as if entered through the wiki web front end. This way, the documentation in the wiki is guaranteed to be current and to fit the configuration found on the live system - it is directly pulled from the live system. Yes, rendering of the code is currently suboptimal. Working on it.

19 April 2007

Russell Coker: a Heartbeat developer comments on my blog post

Alan Robertson (a major contributor to the Heartbeat project) commented on my post failure probability and clusters. His comment deserves wider readership than a comment generally gets so I'm making a post out of it. Here it is:


One of my favorite phrases is "complexity is the enemy of reliability" . This is absolutely true, but not a complete picture, because you don't actually care much about reliability, you care about availability.

Complexity (which reduces MTBF) is only worth it if you can use it to drastically cut MTTR - which in turn raises availability significantly. If your MTTR was 0, then you wouldn't care if you ever had a failure. Of course, it's never zero

But, with normal clustering software, you can significantly improve your availability, AND your maintainability.

Your post makes some assumptions which are more than a little simplistic. To be fair, the real mathematics of this are pretty darn complicated.

First I agree that there are FAR more 2-node clusters than larger clusters. But, I think for a different reason. People understand 2-node clusters. I'm not saying this isn't important, it is important. But, it's not related to reliability.

Second, you assume a particular model of quorum, and there are many. It is true that your model is the most common, but it's hardly the only one - not even for heartbeat (and there are others we want to implement).

Third, if you have redundant networking, and multiple power sources, as it should, then system failures become much less correlated. The normal model which is used is completely uncorrelated failures.

This is obviously an oversimplification as well, but if you have redundant power supplies supplied from redundant power feeds, and redundant networking etc. it's not a bad approximation.

So, if you have an MTTR of 4 hours to repair broken hardware, what you care about is the probability of having additional failures during those four hours.

If your HA software can recover from an error in 60 seconds, then that's your effective MTTR as seen by (a subset) of users. Some won't see it at all. And, of course, that should also go into your computation. This depends on knowing a lot about what kind of protocol is involved, and what the probability of various lengths of failures is to be visible to various kinds of users. And, of course, no one really knows that either in practice.

If you have a hardware failure every 5 years approximately, and a hardware repair MTTR of 4 hours, then the probability of a second failure during that time is about .009%. The probability of two failures occuring during that time is about 8^10-7% - which is a pretty small number.

Probabilities for higher order failures are proportionately smaller.

But, of course, like any calculation, the probabilities of this are calculated using a number of simplifying assumptions.

It assumes, for example, that the probabilities of correlated failures are small. For example, the probability of a flood taking out all the servers, or some other disaster is ignored.

You can add complexity to solve those problems too ;-), but at some point the managerial difficulties (complexity) overwhelms you and you say (regardless of the numbers) that you don't want to go there.

Mangerial complexity is minimized by uniformity in the configuration. So, if all your nodes can run any service, that's good. If they're asymmetric, and very wildly so, that's bad.

I have to go now, I had a family emergency come up while I was writing this. Later...


End quote.

It's interesting to note that there are other models of quorum, I'll have to investigate that. Most places I have worked have had a MTTR that is significantly greater than four hours. But if you have hot-swap hard drives (so drive failure isn't a serious problem) then having machines have an average of one failure per five years should be possible.

13 April 2007

Jose Carlos Garcia Sogo: TomTom Go 510... a Linux device!

TomTom Go 510 A couple of weeks ago my girlfriend buyed me a Tom Tom Go 510 a very popular car GPS navigation system here in Spain (mostly because goverment installed tons of radars for speed control). Today, searching for some info to see if it was possible to update the device using Linux, I discovered that the device runs Linux! So, without knowing, I have an embbeded device running Linux, and more than one million people have also a device running Linux. This clearly shows how Linux can be nice a solution for an embbeded commercial solution.

11 April 2007

MJ Ray: Satellite TV and Media Links for 2007-04-11

Ofcom publishes research on media literacy
Analysis of a research report: "Certainly a useful document to have on hand, if only to deconstruct."
Karen Bremner - The Apprentice Series 2
A new art form: go on a reality TV show, start blogging to raise profile, get hired by Old Media, then leave the site to bit-rot. How many of these "reality TV star headstones" sites are there now?
predicts problems and confusion for consumers
If anyone doubts how much big media gets bad PR from trying to use their big influence to direct the market (such as making their films only available in their format), check the first comment: "I'm waiting for the corporate idiots to decide"
xmltv, was: [Debian-uk] Getting wired in Manchester
Another thing on my "must try that when I get my DVR built" list.
theLargePrint.com The New Media Landscape and the BBC's Lost Horizon
Nice criticism of BBC's link-up with anti-competitors. I recently wrote about the BBC-Google link, which raises some similar problems.
BBC NEWS Business Fewer charges for website content
Figures from 2006 (I'll do media linkposts more often in future).
Time to read the papers?
I only get time to read one paper per week, unless I'm travelling.
Number 10: Tony Blair Interview with Stephen Fry
Fantasy TV shows number 10: A bit of Fry and Blairie.
BBC NEWS Technology Broadband switching set to ease
They say new rules came in on 14 February, but sites like moneySavingExpert.com are still full of tales of woe.
We the undersigned petition the Prime Minister to ban tv competitions/quizzes which charge extortionate caller rates (eg The Mint).
Sign this to clear UK digital TV of all these scam quizzes. I see that after just a taste of humble pie, itv play is back on air overnight on itv1.

10 April 2007

Mohammed Sameer: Got the last GPS unit...

The last TomTom one European from Anttila in the Sello shopping center.
Got that for 380 Euros. Not bad I guess.

And I just discovered that I had to buy a few more things and ended up paying 404 Euros! That's a geeky number ;-)

Now let's see if I can know where I'm when I'm in the bus!

Thanks Lazyweb for the suggestions.
read more

Next.

Previous.