try... except with unknown error types

Roy Smith roy at panix.com
Sun Aug 21 22:09:19 EDT 2011


In article <4e51a205$0$29974$c3e8da3$5496439d at news.astraweb.com>,
 Steven D'Aprano <steve+comp.lang.python at pearwood.info> wrote:

> http://www.codinghorror.com/blog/2011/04/working-with-the-chaos-monkey.html

I *love* being the Chaos Monkey!

A few jobs ago, I had already turned in my resignation and was a 
short-timer, counting down the days to when I was out of there.  A new 
server had just come in and I was helping the guy who was going to 
replace me set it up.

This was the first server we had gotten with RAID and redundant power 
supplies and I wanted to test them out.  My accomplice was horrified, 
but technically I was still his boss, so I got to do what I wanted.  I 
opened up the drive shelve and yanked out a drive.  The console printed 
a nice neat warning about loss of media and kept chugging along, just 
like it should.

Then I pulled out a second drive.  Sure enough, the whole array failed, 
just like expected.

Then, I decided to have a go at the redundant power supplies.  We paid a 
lot of money for that, and I damn well was going to test them now, when 
there was no real risk.  I grabbed the big handle on the front of one of 
the (hot swappable) power supplies and pulled.  The whole thing went 
dark.  Turns out there had been an configuration error and the second 
power supply had never been installed (just a faceplate that looked like 
a power supply).  My buddy was pissed, but I figure I'd just done him a 
big favor.  Better to find out about it now than when the supply failed 
at some critical juncture.



More information about the Python-list mailing list