Things I will do differently in the next building power shutdown (part 2)

Back at the start of last September, we had an overnight building widepower shutdown in the building with our machine room and I wrote alessons-learned entry in the aftermath. Well,we just had another one and apparently I didn't learn all of the lessonsthat I needed to learn the first time around. So here's another set ofthings that I've now learned.

Next time around I will:

  • explicitly save the previous time's checklist. If nothing else,the 'power

Using rsync to pull a directory tree to client machines

Suppose that you have a decent sized directory tree that you want some number of clients to mirrorfrom a master server (with the clients pulling updates instead of themaster pushing them), perhaps because you've just noticed undesiredNFS dependencies . Things in the directorytree are potentially sensitive (so you want access control), it's updatedat random, and it's not in a giant VCS tree or something; this is yourtypical medium-sized ball of local stuff. The straightforward bruteforce approach


Third party Linux kernel modules should build against non-running kernels

For my sins, I have to deal with third-party kernel modules ( someof them open source, some of them not somuch). When you deal with third party modules, you get to rebuild themevery time you update the kernel. At one level, almost everyone has thisdown pat these days; you run a command or two and you're done, witheverything handled properly.

(I would like to say that this is a very welcome development. I've beenaround Linux long


Why I wound up using Django

Eevee just wrote (and Ijust read) a good article on Python web development . It was aninteresting experience for me, because a great deal of the article isabout a middle level in Python webdev that I've basically skipped rightover. I've worked at the level of CGI and WSGI and I've worked in thebig framework land of Django , but I've neverplayed around in the world of relatively simple and component-izedPython web frameworks that Eevee mostly talks about (to


Counting your syndication feed readers

Suppose that your blog has a syndication feed, and you would like toknow how many people are reading it. While you could just look at yourweb stats to see how many different people pull your feed, the numbersaren't you'll get won't be too useful. Some of those feed requests arefrom aggregators and not all aggregators report readership numbers toyou (and some of them have no idea, for example planet-style aggregatorsthat just put the result up on a web page)


Look for your performance analysis tools now

Last night and this morning we had a significant NFS performanceproblem on one of our ZFS fileservers , which was a bit stressful . Our fileservershave multiple ZFS pools, each with multiple NFS exported filesystems,and the fileserver was just not responding very well for prettymuch any of them. We got as far as determining that one mirrorpair of disks for one particular pool were probably saturated (basedon iostat figures), but that was a long way from being able toidentify who was doing what on what filesystem to


Explaining a piece of deep weirdness with Python's exec

In an update in yesterday's entry on scopes and what bytecodes theyuse I said that the special *_NAME opcodes couldwind up being used in functions but that it would take an entire entryto explain when and why, and I also included a trivia bonus that I needto explain. It will probably not surprise you to know that these twothings turn out to be intimately connected.

To start with, here is an altered version of yesterday's bonus trivia that adds a second oddity:

def geta

Python scopes and the CPython bytecode opcodes that they use

Since I just got very curious about this, I want to write it down.CPython has four different families of bytecode opcodes for accessingvariables, which are used under different circumstances and look indifferent places. They are:

  • *_FAST opcodes are used to access function local variables, whichhave a special storage scheme .They're used in function scope for variables that are not part of aclosure (including inside a closure for variables that are local tothe closure alone).

  • *_DEREF opcodes are used

Into the depths of a Python exec scope-handling bug

I can rarely resist a Python mystery, so when I saw The execStatement and A Python Mystery (via Hacker News )my eyes lit right up. Here is the code in slightly shortened form(from here , via HN again):

def exec_and_return(codeobj, x):  exec codeobj  return xco1 = compile("x = x + 1", '', 'exec')co2 = compile("del x", '
                    
                
                
                    
                
            
            
            

Notes to myself about progressive JavaScript

Now that I am starting to add various bits of JavaScript to ouraccount request system , I'm beingfaced with the issues of making things still work gracefully ifJavaScript isn't enabled at all. This is not exactly a new issue , especially giventhat I'm more than a decade late to this particular party, and so I'mwriting things down here just to get them fixed in my mind.

(I'm punting on browser-dependent issues by assuming that JQuery will make them go