IPAddr -> IP

February 14th, 2010

A month or two ago, I’d noticed some RSpec tests were taking a long time to run. When my ADSL connection dropped out during the day, I found the tests took an increasingly long time to run. Strange – how can lack of Internet connectivity cause some straightforward specs to… aah, it’s because they’re doing DNS lookups all the time.

Brian Candler, a colleague of mine, then published the API-compatible (UPDATE: Brian reminds me it is mostly API-compatible – see his comment) ruby-ip. To quote verbatim:

Why not IPAddr?

Ruby bundles an IPAddr class (ipaddr.rb). However there are a number of serious problems with this library.

  1. Given an IP address with a netmask or prefix (e.g. 192.0.2.0/24) it’s very hard to get access to the netmask part. It involves digging around instance variables.
  2. It’s impossible to deal with an off-base address with prefix, because IPAddr forcibly masks it to the base. e.g. 192.0.2.53/24 is stored as 192.0.2.0/24
  3. IPAddr uses calls to the socket library to validate IP addresses, and this can trigger spurious DNS lookups when given an invalid IP address. ruby-ip does not depend on the socket library at all, unless you require ‘ip/socket’ to have access to the Socket::AF_INET and Socket::AF_INET6 constants.

Today’s checkin waves goodbye to IPAddr, and gives a warm handshake to IP. Thanks, Brian!

Making the perl in to ruby

January 24th, 2010

I think it’s high time I removed the SNMP proxy.  It’s coded in perl, which is a language I love and have used for years, but not one which fits in to NetHorus in any way that could be considered pretty.

The history is concise – since NetHorus depends on SNMP heavily, it made sense to use Perl’s SNMP library to get things up and running.  I coded a proxy using XMLRPC, which Perl and Ruby both speak, with the intention of removing the Perl proxy at some time.

That time is now.  The SNMP support in Ruby is there, some quick tests have shown it can import MIB files, so here goes…

Welcome to 2010

January 20th, 2010

Three or four months of development is now checked in to Subversion.  Over 90% of the code should be covered by RSpec tests, and there are two important new features:

  • Background queue daemon, which queues jobs submitted from the web interface – and later, scheduled and reactive jobs.
  • Worker process, which pulls jobs from the queue daemon and does the actual work.  A lot of the code from the Device model is now in a separate library.

And what’s next on the roadmap?

  • Built-in SNMP support – no more external SNMP proxy.  I am biting the bullet and using Ruby’s SNMP support… wish me luck as it doesn’t appear to be as good as Net-SNMP!
  • Scheduled jobs, such as backing up configurations every night (or more often)
  • Cucumber support for testing.  Brian Candler (of deploy2.net) has shown me exactly how cool it is.

I am hoping to get a beta (or at least alpha) release out in the next few months.  That’s not bad going for somebody who has a full-time day job and a pretty busy social life :)

Distributed Ruby

December 12th, 2009

The cause of the silence this time?  Distributed Ruby (DRb).  It’s pretty magical, and I’m splitting out much of the Rails code in to Ruby code to be executed by a worker process.

Anything long-running, such as inventorying a device, will happen in the background.  Anything instant will still happen in the background, but NetHorus will politely wait.

This is a fairly major change to NetHorus, and it does delay it being usable for a while longer.  Then again, if you need anything usable right now, you shouldn’t be using NetHorus anyway :)

A new layout

September 22nd, 2009

I am not the best at designing layouts – I’ll freely admit that.  Corinne Pritchard of Simply Understand, on the other hand, is really quite good at it.

With her help (and a giant pizza), we have redesigned the stylesheet and overall layout.  The changes aren’t in NetHorus’ Subversion repository just yet – give it a couple of days.

The new layout of NetHorus

Development update

September 14th, 2009

More changes and updates – it’s been a whole 47 days since the last check-in, mostly due to my tardiness.

Go check it out :-)

MPLS Exam

September 14th, 2009

I am now less qualified than before my MPLS exam.  Oh, the irony!  I need to re-revise my CCNA because it’s now expired, although that shouldn’t be too difficult as I scored highly the first time around.

Note to self: just because the tutor skipped large chunks of Traffic Engineering (TE) on the course doesn’t mean that it’s not in the exam.  Looking on the positive side, I know exactly what I need to revise, and I was only a few marks off passing.

Development Hiatus… only temporary

July 24th, 2009

I am studying for my Cisco MPLS exam which is coming up in – eek – under a fortnight! As such, I can’t spare the time to work on NetHorus right now.

Normal service will be resumed when I know the result of the exam :-)

A month of heavy coding

June 11th, 2009

Here are some highlights from the last month of heavy coding:

Bugfixes

  • ‘MacAddress’ datatypes are now correctly converted to hex
  • Insecure temporary file use in DiagramController fixed
  • If Graphviz doesn’t exist, a warning is generated rather than a nasty error
  • ADSL rate/usage calculation is done correctly now

Improvements

  • The ‘All Interfaces’ page has a new link to show the interface status of all interfaces
  • Major reworking of device inventorying to become more modular
  • Better testing, of course!

Usability

May 4th, 2009

So far, one of my big itches has been on usability and stability of NetHorus. There are so many things that could go wrong that go untrapped.

This weekend, I’ve concentrated on improving robustness and polishing the user interface. The commits are still pending – there’s plenty changing, which I hope to get finished during the week.