You are here

bcrc

BCRC Server Update

We updated the BCRC server over spring break. We've known we needed to do it for a long time now, but have been putting it off because we have old Drupal 6 sites that need to be migrated, I've believed that they (or some of their modules) will probably not work with newer version of PHP in this version of Ubuntu. During the Fall, we updated the server in the ISB and, to prepare, we tested and I rewrote some of the old legacy code that I had written. So we knew that much. But this server was enormously more complicated.

It turned out there were only two serious problems with my old code. Originally, PHP used its own regular expressions library (ereg) but, at some point, started including functions against the perl regular-expressions library (preg). I've probably been using PHP since before it had either. But I had to make minor API changes and update my functions to use perl regular-expressions. I also had start using mysql very early and those functions had become deprecated, so I needed to make minor changes to all of those.

The first serious problem was that our MySQL databases didn't get updated properly. The updater is supposed to be able to ask mysql to update the databases, but something went wrong. At first, mysql wouldn't start at all, I think because it was confused about which my.cnf it should be reading. This was probably why the update didn't work correctly. This server has existed since ~1995 and was originally a Sparc 10. Then we got an E250, then a T5220, and most recently a Supermicro running Ubuntu. But a lot -- too much -- of that history is still there. Once I cleaned up the my.cnf files, we got mysql running, but it couldn't read the database of users and so nothing could get access to its data. It turns out that to update the database, you need to log in as "root" so if you can't log in, you can update the database. So then I shut down the service and started it manually with --skip-grant-tables. Then I was able to run the upgrade script. Then mysql came up. (Note this story actually skips several epicycles I made trying to sort out the problems, but is what I did in the end.)

Before the migration, I had started re-building a new web-tree around Drupal 8 (rather the old tree which was built around Drupal 6) hosted at a different CNAME. I had migrated the key pieces of what I wanted going forward, without taking down the old web-tree. After the update, I switched to the new web-tree and then migrate stuff out of the old tree to the new one. I figured this was potentially more disruptive, but safer: there was a lot of old history that was infested with bitrot. It seemed better to start with known good things and then rescue stuff that people identified as missing after-the-fact.

There are still a lot of rough edges: broken paths, missing images, stuff that needs to be reconfigured. But basically good to go. The two most complicated updates are yet to come. But this was a good test-bed to help us prepare for what we need to do for those.

Moss Terrarium

Moss Terrarium

For several years, I kept an Emperor Scorpion named Muffy in my office. When he died, I put the terrarium on a shelf. I would notice it every so often and think of ways it might be made useful again. I thought about creating a terrarium with moss and had seen some places up in Pelham where I thought I might be able to collect some mosses to put in it. But it was never convenient.

Today, I noticed that, under the melting snow, there was a big flat piece of moss that had been scraped up off the driveway during snow shoveling which looked relatively intact. And I saw another spot where another big piece could be collected. I darted back into the house, grabbed an old grocery bag (the kind that is now illegal in Amherst), and grabbed the mosses before running for the bus.

I laid down a layer of potting soil, soaked everything pretty well, and then arranged the patches of moss to cover the interior.

Inside Moss Terrarium

At some point, some colleagues and I ordered some things from Small Dog Electronics which included little statuettes of dogs with the product. I had put them in to keep Muffy company years ago, but now they have a new, green lawn to populate. I've put it out in the BCRC and I hope the students will also find it restful to look at during the long winter months to come.

Subscribe to RSS - bcrc