Links [2009/01/11]

The Year That Was Two (i.e. 2007/2008 in review)

So, for me last year was really 2008 & 2007. I never really took the time to slow down at the end of 2007 and reflect on the year. I just ended up rolling right into 2008. At the time I was building clusters for Engine Yard, among other duties. That combined with a new baby and crazy travel schedule made for very little time during the holiday season for anything but a brief visit with my mothers on x-mas day to open presents with the kids and have breakfast. So long story short, the last year, for me at least, was really two years. Two very mixed years. Pros
  • Interlix was going strong.
  • I started working for Engine Yard in June of 2007 as a contractor.
  • Mia was born on July 3rd, 2007.
  • I got my current bike, a Triump Sprint ST, after successfully selling my Victory on eBay.
  • Geekerz was still around.
  • I played EVE occasionally, at least until I started working for EY and I pulled myself out of Geekerz.
  • With Engine Yard's help, I moved to Sacramento, CA, escaping Missouri after a little more than 6 years there.
  • I rode my motorcycle out to CA from MO.
  • New house in Sacramento, CA. With a hot tub.
  • Got to see my extended family at my mother's funeral.
  • Met tons of interesting people by way of Engine Yard.
Cons
  • My mother died of complications due to brain cancer.
  • Vapor (aka Daniel Feather) died in a motorcycle accident.
  • Joey died of complications due to cancer.
  • I moved to Sacramento, CA, not the bay area.
  • Still have my house in Republic, MO
  • Couldn't sell Interlix, ended up closing it down.
  • Not much time for family given my work schedule. But that's the life of working for a startup.
  • Paying my brothers rent.
If I think of anymore I'll update the post. What were your pros and cons of 2008?

My First Erlang Program

I've been looking for some elementary 'puzzles' to code up in Erlang so I can figure out the language a bit. In passing, I came across Facebook's "Programming Puzzles" page. So today, the rest of the family went to a birthday party and I stayed home to solve the first puzzle and get my hands dirty with some Erlang. Here is the resulting code....
-module(hoppity_hop).

-export([ handle_file/1 ]).

handle_file(Fname) ->
    case file:read_file(Fname) of
        {ok, FData} ->
            parse(FData);
        {error, Reason} ->
            {error, Reason}
    end.

parse(Bin) ->
    do_hoppity_hop(lists:seq(1,list_to_integer(lists:nth(1,string:tokens(binary_to_list(Bin)," \t\r\n"))))).

do_hoppity_hop([Head|Tail]) when Head rem 5 == 0, Head rem 3 == 0 ->
    io:format('Hop~n',[]),
    do_hoppity_hop(Tail);

do_hoppity_hop([Head|Tail]) when Head rem 3 == 0 ->
    io:format('Hoppity~n',[]),
    do_hoppity_hop(Tail);

do_hoppity_hop([Head|Tail]) when Head rem 5 == 0 ->
    io:format('Hophop~n',[]),
    do_hoppity_hop(Tail);

do_hoppity_hop([Head|Tail]) ->
    do_hoppity_hop(Tail);

do_hoppity_hop([]) -> false.
If anyone has any feedback, I'd love to hear it. This is the first time I sat down and actually wrote anything in Erlang, so I won't be offended. :-) I should probably write a quick python version too, just so I know that skill set isn't totally wasting away. ;-)

RailsConf

This was my first RailsConf. I figured it would be bigger for some reason. In retrospect I'm not sure why I originally thought that. It was bigger than the last conference I went to, which was PyCon 2007. I didn't get to go to many of the talks I wanted to go to, mostly because I was spending time either working on the Engine Yard Express Image, at the booth talking with customers and potential customers or chatting with other Engine Yard Employees I hadn't met face to face before. It was really cool to meet various customers that I've worked with previously. I also finally got to meet David Chelimsky face to face. I've worked with him for a while now via Articulatedman, who was a customer of Interlix, my old hosting company. Ezra announced the Engine Yard Express image and Vertebra at his talk. Since they're now public I'll probably start blogging about both of those projects from time to time. Finally. :-) If anyone starts using the Engine Yard Express image and has any problems, comments or suggestions, please email me @ work ... emuller (at) engineyard (.dot.) com.

How to disable some servers with ethtool

for n in 05 06 07 08 09 10 11 12 13 14 15 16; do echo $n; ssh ey01-$n ethtool -p aoe0; done This will ssh to a machine & run ethtool -p aoe0 on that machine. You then hit, control-C and go to the next node. At least that was the theory. It turns out that the control-C kills the ssh session, but not ethtool. We (myself and Matt, another Engine Yard Engineer) did this on Monday in an attempt to identify which logical nodes are running on what physical servers. We needed to do this because on Sunday morning we moved cluster ey01 to another location and during the move we needed to replace a power distribution unit. We made a map of the power plugs, but we used logical nodes, not physical servers. We needed to update that map to represent physical servers, which can be different from logical nodes. Both myself and Matt have used ethtool to do this exact same thing before, in production environments, without problem. Also, we tested 5 nodes by manually ssh'ing to the node and running "ethtool -p aoe0" manually. No problems. We were 4 servers into the above for loop before we realized that ethtool was still running on the previous nodes. So we tried to ssh to the affected nodes. No love. In fact one of the nodes itself crashed completely. We were able to get into the other 3 nodes via local KB/Monitor and kill ethtool without any further disruption to those nodes. Anyway. At some point I want to duplicate this on the test cluster and figure out what exactly happened.