Archive for October, 2006

The Apocalypse — Who Would Have Guessed Its Me?

Saturday, October 28th, 2006

The apocalypse. I’ve always known I’ll have a hand in it. — Hunter

Too true, Hunter. However, now that I’m the current maintainer of Current its all my fault. I’m sure if you are bored enough to read this than you have heard of Oracle announcement of Unbreakable Linux. Included with that is Oracle’s Unbreakable Linux Network which is the RHN-alike.

If you know where to look (besides here, obviously) its no secret. Oracle’s Unbreakable Linux Network is based on Current. The web user interface was created with Oracle’s Apex product. Fortunately, I seem to have a fairly decent relationship with a few folks in Oracle’s linux team. They’ve been hacking on Current and asking questions for a while. I’ve even been sent patches with the promise of more to come. They have been working on Current in good faith and I really appreciate that.

Most of the changes Oracle has made are in porting Current to run with an Oracle database. Unfortunately, with the way the database layer is designed and the differences that Oracle requires I can either have support for an Oracle database or have support for SQLite, MySQL, and Postgres. So those patches wont appear in Current’s SVN tree anytime soon. However, I’m definitely still interested in solving this problem the Right Way(tm) by porting Current to use SQLAlchemy. I’ve definitely told folks I will accept such a patch. However, there’s enough SQL in Current to make that quite a bit of work.

For the truly bored with way to much free time, there is one other thing that I’d like Current to have. A suite of unit tests aimed at the external XMLRPC API and the directory structure that Apache serves out via Current.

I definitely think that there are interesting times ahead for Red Hat and the Oracle Linux offering. Its obvious that Oracle has no desire to put Red Hat out of business as their linux offering is completely dependant on the continued maintenance and new releases of Red Hat Enterprise Linux. If you scratch off the Unbreakable Linux sticker you’ll see RHEL underneath. We all know that there have been rumors for months about Oracle wishing to acquire Red Hat.

I believe that this could really put Red Hat back in the game on the competitive edge. Perhaps Red Hat needs a good bit of competition. Working at a university I know well that Red Hat’s support offerings are very expensive and they are sold on the subscription model. Red Hat, the subscription model by itself just isn’t competitive and doesn’t allow my place of work to purchase support at a reasonable cost level. How about offering different support schemes and let your customers buy what’s right for them. Sell support instances. Let me buy a 10-pack. What about support contacts? Pay a flat rate per year for one person at an institution/company to open as many support instances as needed. Make a bigger deal of your web based support products. Quit porting RHN to Java and make it the management tool of the future.

Cups and Printing

Wednesday, October 18th, 2006

The last couple weeks have involved a lot of me banging my head on my desk trying to make printing sane. We have used LPRng at NCSU for quite some time now. It scales well and it supports strong authentication via kerberos. Authentication is important as users buy print quota with a credit card, normally 6 cents per black and white page.

However, LPRng has become rather unmaintained and Linux and other platforms are moving in the direction of Cups and IPP based printing. Even more, Cups provides a printing API that GUI applications, like OpenOffice.org, are starting to use. So I am quickly approaching a divide where CLI based printing still works but the GUI applications insist on printing to Cups which knows nothing about my kerberized LPRng printers.

Cups is currently not deployable mainly due to the lack of strong authentication. It supports PAM authentication which is an attempt in the right direction. However, who wants to enter their username and password for every print job…that’s when the local print drivers know what to do with Apache style basic auth. That’s more broken than functional.

I’m getting into more and more situations where if somebody has set up a Cups browsable printer near a lab that breaks printing for the entire lab. So what to do as Cups develops kerberos support and better scalability? We write our own driver. Halloween coding style. Its some scary code.

In a nutshell, it runs as root and nukes things that Cups puts in LPRng’s way. Then it changes to the user that ran the print job, finds their authentication bits, and runs lpr from our local LPRng distribution. Some impressively bad code, but it is successful at integrating Cups onto our printing system.

While I’m working on all this I’ve also been poking around Cups as I know well of the Google Summer of Code project to add proper kerberos support for Cups 1.3. Oddly enough, today I was made aware that apparently the work is done. Today I was made aware of the rumors saying that Cups 1.3 will be released very soon. *sigh*

To top things off looks like there’s some LPRng code that supports kerberized IPP too. Its really bothersome how powerful LPRng can be yet I’m almost being forced to move away from it. Another thing I’m interested in is pulling printer information out of LDAP and into Cups. However, Cups doesn’t seem to understand that LDAP is a read only database, it seems to want to use LDAP as its own data store.

In any case, I look forward to testing Cups 1.3 and seeing what’s new and what’s different.

Learning Advanced SQL

Saturday, October 7th, 2006

The more I get into Current the more and more SQL I need to know. Right now I’m working with implementing a tree with SQL using nested sets. There are some great examples and tutorials on the internet about doing exactly this and most of these end up creating some pretty serious SQL. I’d really like to implement some of my operations in Current with just one SQL execute call however I’m directly working with 3 different databases so my SQL must be standards compliant.

MySQL can create and assign data to variables in SQL using something that looks like this:

SELECT @myRight := rgt FROM nested_category

See the MySQL docs. Now what about SQLite? Or PostgreSQL?

PostgreSQL will let you embed SQL in your C code. Hey, that’s gross! I should stop googling.

In the long term in Current becomes useful, I would like to migrate to using a database tool kit like SQLAlchemy. I’d really like to be able to wrap my head around what will be possible with SQLAlchemy. What level will my SQL be confined to? It does look like I can do bind variables with it. But what about more advanced SQL usage? Every database is so different.

The Latest Updates from Linux Czardom

Friday, October 6th, 2006

I finally fixed the blog feed on my homepage yesterday. Actually, its a pretty simple little script that uses Kid to parse the Atom feed. Take a look.

Its based off of one of the excellent examples on the Kid website. However, it does require that the XHTML used for each post must be correct. Sometimes code fragments get me. Its what blew up my personal website before. Indeed, it would be great if Google would have some better ways to post code.

In other news, I don’t believe that I have posted that there is a new development version of Current available. This is version 1.7.6. The previous development version would traceback during scanning of channels. Definitely not a feature. I’ve begun work on integrating an OU tree into Current to manage groups of machines and permissions in a much more flexible way than what’s used in RHN. Time for fun stuff to start happening.

I’m still looking for someone that would be willing to help out with Current by working on the templates or any part of the TurboGears web interface. That would be really helpful.