Tech Updates, looking to the future

A few things I’ve been looking at or intending to look at over the next few months.

  • I’ve bought a new computer a couple of weeks ago for home. The computer is intended to replace the house server. The main functions will be as a file server and host for virtual machines. The big changes is that I’ll be switching from Xen to KVM as virtualisation technology.
  • KVM + PXE + Kickstart + Ubuntu  – I really want to build my virtual machines automatically and at the same time to be using a more general machine building method . This page on the Ubuntu site looks like it is a good start and I’ll blog a bit when I get it all done.
  • I need to do some work on Mondo Rescue , I have a bug I reported that is supposed to be fixed and I have to test.
  • GlusterFS is a distributed network file system that looks really cool, I’m intending to play with this a bit.
  • Once again we’ve applied to do a Sysadmin Miniconf at the 2010 Linux.conf.au conference. Once again we hope to have a really good miniconf. However no less that 32 miniconfs have applied for just 12 slots so not sure if we’ll get in. We were really popular last year but personally I’ve no idea what our chances are this year. Bit down about the thought of not getting but I guess whatever happens will happen.
  • I keep getting good ideas for websites and products. Not programming and having poor time control means most of these ideas are probably not going anywhere. Maybe I’ll try a couple of them though. Also got some further ideas for technologies to play with but want to get the ones above sorted first.
Share

Watching processes with monit

I’ve been having a small problem on one of my server with the http daemon dying every week or two. It’s not often enough to be a huge problem or invest a lot of time in by enough of a nuisance to require a fix. So what I ended up doing was installing monit to look after things.

monit is a simple daemon that checks on server resources ( mainly services and daemons but also disk space and load ) every few minutes and sends and alert and/or restarts the service if there is a problems. So after installing the package ( apt-get install monit ) I just created a series of rules like:

check process exim4 with pidfile /var/run/exim4/exim.pid
   start program = "/etc/init.d/exim4 start"
   stop program = "/etc/init.d/exim4 stop"
   if failed host 127.0.0.1 port 25 protocol smtp then alert
   if 5 restarts within 5 cycles then timeout

check process popa3d with pidfile /var/run/popa3d.pid
   start program  "/etc/init.d/popa3d start"
   stop program  "/etc/init.d/popa3d stop"
   if failed port 110 protocol pop then restart
   if 5 restarts within 5 cycles then timeout

for the main processes on the machine. Sample rules are available in the config file and documentation and google is fairly safe as long as you make sure you don’t copy a 10th generation rule of a “Ruby on Rails” site ( ROR components apparently require frequent restarts). All up the whole install and configuration took me around half an hour and I’m now monitoring:

# monit summary

System 'crimson.usenet.net.nz'      running
Process 'lighttpd'                  running
Process 'sshd'                      running
Process 'named'                     running
Process 'exim4'                     running
Process 'popa3d'                    running
Process 'mysql'                     running
Process 'mailman'                   running
Device 'rootfs'                     accessible
Process 'mailman'                   running
Share

Hacking InternetNZ Council Vote

Internetnz is the main New Zealand Internet lobby and policy organisation. More or less they take money from .nz fees and redirect it to benefit the New Zealand Internet and Internet users.

In a few days there is an election for it’s president and council. Following a post by Andy Linton to the NZNOG mailing list about the “need for a strong voice from the technical community” several technical people have put their name forward for council.

Following a discussion on the Internetnz mailing list I realised that many people are unsure of the best way to rank a list of candidates to ensure the “best” result. Looking around I was unable to find a good reference for this online so I thought I’d write a quick post here. I should give the disclaimer that I’m not an expert in this are so possibly I’ve made an error. I’m also only addressing the Council Vote note the President and Vice-President votes.

Voting System

The voting system for Internetnz is outlined here but what it simply means for the voter is that they rank the candidates from 1st to last. For each council seat the lowest polling candidates are eliminated and their votes allocated to the next preference until one has an absolute majority. For the next council seat it happens again except the ballots that had the previous round winner as first preference are eliminated from any further consideration.

You can see what happened last year here . There were 9 candidates, 6 seats and 90 voters. Rounds 1 through 7 show people being eliminated and their votes transferred around until Jamie Baddeley is elected. On Round 9 it starts again but 16 votes have been removed from the pool, these are the people who voted for Jamie as their first preference.

In rounds 9 though 15 the eliminations continue until Michael Wallmannsberger is elected. Then his 16 first preference votes are removed and it starts again until all 6 candidates are elected. The 2006 result is also online .

The interesting thing to notice is that only ballots that put an elected candidate as the 1st preference are eliminated in the first round.  So while the 16 people who voted for Jamie Baddeley helped elect him in the first round they had no influence in later rounds. On the other hand the 22 people who put Neal James, Carl Penwarden, Sam Sargent and Muchael Payne as their first preference got to participate in all 6 rounds of the election.

So what is the trick?

So out of the candidates I would characterise the following people as technical: Lenz Gschwendtner, Glen Eustace, Stewart Fleming, Andrew McMillan, Dudley Harris, Gerard Creamer, Nathan Torkington and Hamish MacEwan. This is eleven out of the 17 candidates running for the four  council seats.

Now assuming that there is a some level of support for technical candidates the worst case would be that all “technical” voters put say Nathan Torkington (to pick a well known name) as first preference. Nathan is elected as the first candidate and then the technical voters have no further influence on the other 3 councillors.

Instead we want to make sure that techie votes elect as many candidates as possible.

So what should I do?

Note: I am using the term “round” below to refer to each council seat election ( 6 in 2008, 4 in 2009 )

If you have a group of voters and a ground of candidates you have two main objectives:

  1. Avoid giving a first preference to a candidate that will be elected in the early rounds so your ballot will participate in as many rounds as possible.
  2. Give enough first preferences to your candidate to ensure they are not eliminated early in each round

The first idea is easy. Don’t give you first preference to a technical candidate. However this is where the second objective comes in, you need to give them enough first preference votes so that they are not eliminated early in every round.

I think the following should work:

  1. Rank all the candidates in you order of preference
  2. Decide how far down the list you are “happy” with the candidates (ie the 11 techies listed above)
  3. Randomly (yes, really randomly) pick one of the acceptable people and put them as your first preference.

The idea now is that if say we have 40 technical people voting then each of the 11 technical candidates will end up with at least 3 or 4 first preference votes. As the lowest ranked of these is eliminated then preferences will flow to the other technical candidates (in order of most popular) . If a technical candidate is elected only around 1/10 of the technical ballots will be eliminated from later rounds so there is still a good chance of electing other candidates.

What could go wrong?

It’s possible than the random allocation of first preferences will result in a popular candidate ( eg Nathan Torkington ) randomly getting a smaller number of first preferences and being eliminated early in every round. I think this is a small risk since

  1. it is likely that popular candidates will get first preferences from other voters
  2. popular candidates will have a higher random chance of people put as first preference since they will be in the “acceptable” list of more techie voters
  3. Even if this does happen others in the slate will still get in.

Feel free to let me know any questions ( or point out horrible errors I’ve made)

Share