|
|
I got a new Thinkpad T510 at work to replace my aging MacBook Pro. I asked for a Thinkpad instead of another MacBook because I wanted hardware with better hardware support, in particular the trackpad. I got into the habit of bringing a USB mouse everywhere I went because the trackpad on the MacBook was so unreliable on linux.
So when my new T510 arrived, I was pretty excited. And, except for one tiny problem (of the PEBKAC kind), transferring all my files from the old machine to the new one went flawlessly.
Here’s how I set up the new machine:
- Download image from sysresccd.org. Follow the instructions to make a bootable USB drive.
- Boot up computer off USB drive. Resize the existing NTFS partition to be really small. Add 2 new partitions in the new-free space: one for the boot partition for linux, and one to be encrypted and be formatted with lvm.
- Format boot partition as ext3. Setup encrypted partition with ‘cryptsetup luksFormat /dev/sda6; cryptsetup luksOpen /dev/sda6 crypt_sda6′. Setup LVM with ‘pvcreate /dev/mapper/crypt_sda6′. Setup two volumes, one for swap, and one for the root partition.
- Connect network cable between old laptop and new one. Configure local network.
- Copy files from old /boot to new /boot.
- Copy files from old / to new /. Here’s where I messed up. My command was: ‘rsync -aPxX 192.168.2.1:/ /target/’.
- Install grub.
- Reboot!
At this point the machine came up ok, but wasn’t prompting to decrypt my root drive, and so I had to do some manual steps to get the root drive to mount initially. Fixing up /etc/crypttab and the initramfs solved this.
However even after this I was having some problems. I couldn’t connect to wireless networks with Network Manager. I couldn’t run gnome-power-manager. Files in /var/lib/mysql were owned by ntp! Then I realized that my initial rsync had copied over files preserving the user/group names, not the uid/gid values. And since I wasn’t booting off a Debian image, the id/name mappings were quite different. Re-running rsync with ‘–numeric-ids’ got all the ownerships fixed up. After the next reboot things were working flawlessly.
Now after a few weeks of using it, I’m enjoying it a lot more than my MacBook Pro. It boots up faster. It connects to wireless networks faster. It suspends/unsuspends faster. It’s got real, live, page-up/page-down keys! The trackpad actually works!
I’ve just pushed poster 0.7.0 to the cheeseshop.
Thanks again to everybody who sent in bug reports, and for letting me know how you’re using poster! It’s really great to hear from users.
poster 0.7.0 fixes a few problems with 0.6.0, most notably:
- Added callback parameters to MutipartParam and multipart_encode so you can add progress indicators to your applications. Thanks to Ludvig Ericson for the suggestion.
- Fixed a bug where posting to a url that returned a 401 code would hang. Thanks to Patrick Guido and Andreas Loupasakis for the bug reports.
- MultipartParam.from_params will now accept MultipartParam instances as the values of a dict object passed in. The parameter name must match the key corresponding to the parameter in the dict. Thanks to Matthew King for the suggestion.
- poster now works under python2.7
poster 0.7.0 can be downloaded from the cheeseshop, or from my website. Documentation can be found at http://atlee.ca/software/poster/
I’m planning on looking at python 3 compatibility soon.
Also, if anybody has suggestions on a reliable way to test the streaming http code, I’m open to suggestions! My current methods result in intermittent failures because of the test harness I suspect.
poster’s code is now available on bitbucket.
Something prompted me to look at the size of our codebase here in RelEng, and how much it changes over time. This is the code that drives all the build, test and release automation for Firefox, project branches, and Try, as well as configuration management for the various build and test machines that we have.
Here are some simple stats:
2,193 changesets across 5 repositories…that’s about 6 changes a day on average.
We grew from 43,294 lines of code last year to 73,549 lines of code as of today. That’s 70% more code today than we had last year.
We added 88,154 lines to our code base, and removed 51,957. I’m not sure what this means, but it seems like a pretty high rate of change!
Amazingly, one of the most popular links on this site is the quick tip, Getting free diskspace in python.
One of the comments shows that this method doesn’t work on Windows. Here’s a version that does:
import win32file
def freespace(p):
"""
Returns the number of free bytes on the drive that ``p`` is on
"""
secsPerClus, bytesPerSec, nFreeClus, totClus = win32file.GetDiskFreeSpace(p)
return secsPerClus * bytesPerSec * nFreeClus
The win32file module is part of the pywin32 extension module.
I’ve just pushed poster 0.6.0 to the cheeseshop.
Thanks again to everybody who sent in bug reports, and for letting me know how you’re using poster! It’s really great to hear from users.
poster 0.6.0 fixes a few problems with 0.5, most notably:
- Documentation updates to clarify some common use cases.
- Added a poster.version attribute. Thanks to JP!
- Fix for unicode filenames. Thanks to Zed Shaw.
- Handle StringIO file objects. Thanks to Christophe Combelles.
poster 0.6.0 can be downloaded from the cheeseshop, or from my website. Documentation can be found at http://atlee.ca/software/poster/
Mozilla has been quite involved in recent buildbot development, in particular, helping to make it scale across multiple machines. More on this in another post!
Once deployed, these changes will give us the ability to give real time access to various information about our build queue: the list of jobs waiting to start, and which jobs are in progress. This should help other tools like Tinderboxpushlog show more accurate information. One limitation of the upstream work so far is that it only captures a very coarse level of detail about builds: start/end time, and result code is pretty much it. No further detail about the build is captured, like which slave it executed on, what properties it generated (which could include useful information like the URL to the generated binaries), etc.
We’ve also been exporting a json dump of our build status for many months now. It’s been useful for some analysis, but it also has limitations: the data is always at least 5 minutes old by the time you look, and in-progress builds are not represented at all.
We’re starting to look at ways of exporting all this detail in a way that’s useful to more people. You want to get notified when your try builds are done? You want to look at which test suites are taking the most time? You want to determine how our build times change over time? You want to find out what the last all-green revision was on trunk? We want to make this data available, so anybody can write these tools.
Just how big is that firehose?
I think we have one of the largest buildbot setups out there and we generate a non-trivial amount of data:
- 6-10 buildbot master processes generating updates, on different machines in 2 or 3 data centers
- around 130 jobs per hour composed of 4,773 individual steps total per hour. That works out to about 1.4 updates per second that are generated
How you can help
This is where you come in.
I can think of two main classes of interfaces we could set up: a query-type interface where you poll for information that you are interested in, and a notification system where you register a listener for certain types (or all!) events.
What would be the best way for us to make this data available to you? Some kind of REST API? A message or event brokering system? pubsubhubbub?
Is there some type of data or filtering that would be super helpful to you?
A new API to graph server was just enabled today; it lets you fetch performance data for a given revision.
E.g. http://graphs.mozilla.org/api/test/runs/revisions?revision=10d2046d2b64&revision=d16525937c8b
Documentation is here, and the gory implementation details are in Bug 551732.
Enjoy!
Yesterday was a bit of an overwhelming day. After getting home at 1am after a long bus ride home, I was unwinding by catching up on some news and email. I came across these two links, both of which really lifted my mood.
The first, Grokking the Zen of the Vi Wu-Wei, talks about a programmer’s journey from emacs to BBEdit to vim. This post is a great read in and of itself, but what’s really worth it, is the link around the middle of the post to http://stackoverflow.com/questions/1218390/what-is-your-most-productive-shortcut-with-vim/1220118#1220118. This was truly a joy to read. Definitely the best answer I’ve ever seen on Stack Overflow, and quite possibly the best discussion of vi I’ve ever read. It taught me a lot, but I enjoyed reading it for more than that. It was almost like being on a little adventure, discovering all these little hidden secrets about the neighbourhood you’ve been living in for years. Like I said, it was 1am.
The second, The Pope, the judge, the paedophile priest and The New York Times, gave me some reassurance that things aren’t always as they seem as reported by the media. Regardless of how you feel about the Church or the Pope, it seems that journalistic integrity has fallen by the wayside here. From the article:
Fr Thomas Brundage, the former Archdiocese of Milwaukee Judicial Vicar who presided over the canonical criminal case of the Wisconsin child abuser Fr Lawrence Murphy, has broken his silence to give a devastating account of the scandal – and of the behaviour of The New York Times, which resurrected the story.
It looks as if the media were in such a hurry to to blame the Pope for this wretched business that not one news organisation contacted Fr Brundage. As a result, crucial details were unreported.
The entire article is worth a read.
It seems like it was ages ago when I posted about profiling buildbot.
One of the hot spots identified there was the dataReceived call. This has been sped up a little bit in recent versions of twisted, but our buildbot masters were still severely overloaded.
It turns out that the buildbot slaves make a lot of RPC calls when sending log data, which results in tens of thousands of dataReceived calls. Multiply that by several dozen build slaves sending log data peaking at a combined throughput of 10 megabits/s and you’ve got an awful lot of data to handle.
By adding a small slave-side buffer, the number of RPC calls to send log data is drastically reduced by an order of magnitude in some tests, resulting in a much better load situation on the master. This is good for us, because it means the masters are much more responsive, and it’s good for everybody else because it means we have fewer failures and wasted time due to the master being too busy to handle everything. It also means we can throw more build slaves onto the masters!
The new code was deployed towards the end of the day on the 26th, or the end of the 12th week.
 
Johnathan posted links to 3 scripts he finds useful. His sattap script looked handy, so I hacked it up for linux. Run it to do a screen capture, and upload the image to a website you have ssh access into. The link is printed out, and put into the clipboard.
Hope you find this useful!
#!/bin/sh
# sattap - Send a thing to a place
set -e
SCP_USER='catlee'
SCP_HOST='people.mozilla.org'
SCP_PATH='~/public_html/sattap/'
HTTP_URL="http://people.mozilla.org/~catlee/sattap/"
FILENAME=`date | md5sum | head -c 8`.png
FILEPATH=/tmp/$FILENAME
echo Capturing...
import $FILEPATH
echo Copying to $SCP_HOST
scp $FILEPATH ${SCP_USER}@${SCP_HOST}:$SCP_PATH
echo Deleting local copy
rm $FILEPATH
echo $HTTP_URL$FILENAME | xclip -selection clipboard
echo Your file should be at $HTTP_URL$FILENAME, which is also in your paste buffer
|