Present Perfect


Picture Gallery
Present Perfect

Broken internet

Filed under: General — Thomas @ 05:16


Somehow the internet connection at the hotel is pretty flaky - hosts go away all the time, connections get dropped, and so on.

I couldn't post my last post because it claimed our server was done.  A traceroute showed

[root@otto qc-usb-0.6.3]# traceroute thomas.apestaart.org
traceroute to thomas.apestaart.org (, 30 hops max, 40 byte packets
1  * * *
2 (  17.764 ms * *
3  ge (  23.807 ms   20.764 ms   19.847 ms
4 (  18.507 ms   21.117 ms   25.016 ms
5  pos (  269.329 ms   266.176 ms pos (  33.425 ms
6  GE2 (  178.371 ms   397.465 ms   398.535 ms
7  So5 (  177.001 ms   176.764 ms   178.495 ms
8  so (  177.432 ms   179.925 ms   177.145 ms
9  Google (  392.205 ms   392.007 ms Google (  179.016 ms
10 (  178.093 ms   177.834 ms   179.362 ms
11  www.hackerteen.com.br.localdomain (  396.576 ms   391.961 ms (  179.753 ms
12 (  189.074 ms   392.318 ms   392.449 ms
13 (  393.403 ms   393.549 ms *
14  * (  393.850 ms   392.496 ms
15  pop.gmail.com (  180.478 ms   197.719 ms   202.391 ms

Notice how

  • the local DNS server resolved my server name wrong
  • not only was it wrong, but having it be so wrong as to point to gmail.com is probably not just an accident
  • hop 11 has an, uhm, interesting host name

Editing /etc/hosts, adding an entry, and forcing a new traceroute allowed me to finally post my entry.

FISL part 3

Filed under: General — Thomas @ 05:13


Facts of life in South-America:

  • At night a red light is merely a suggestion to slow down a little bit at crossroads
  • Houses are surrounded by grills and fences
  • Your toilet paper is not supposed to go in the toilet, but in a wastebin

I had noticed this on previous visits, but I was reminded of these things again here.
My GStreamer talk went well - for a talk that early into the conference, there were a fair number of people in attendance. All my demos worked. I was smart enough to test my laptop's CRT output the day before - it seems FC5 has an X.org that no longer allows me to have Fn-F7 (switching output modes) to Just Work on my Thinkpad. Instead I had to fiddle with xorg.conf and convince X that a) I want to have something attached to the CRT and b) that I would really like to use a resolution more standard than 848x400.

People seemed to be impressed with both cortado and Elisa as well - I got a few questions even after my talk outside in the main hall.

Paolo, who's responsible for the streaming here, is using Flumotion. 7 rooms are being captured using 7 flumotion managers who then relay the data to an Icecast server using a component Paolo adapted from a previous implementation that was in our Trac. Everything was working fine the night before the conference. The first day however the Icecast server started dropping sources due to socket timeouts. The network guys of course claimed it was Flumotion's fault. After some simple tracerouting (I discovered mrt, which is *excellent* for this) I noticed that the first hop outside the conference had 30% packet loss. Now, I hadn't actually tested Flumotion in such a lossy situation, but it doesn't surprise me that 30% presents a problem for a live stream. At least it made the network people accept the possibility of there actually being a real network problem.

The next morning, the packet loss to their server was up to 90%. That's when I offered to stream through stream.fluendo.com instead, and though it pained me to set up Icecast there, it was the quickest way to transport their existing configuration. Well, quick - I had to build icecast myself, because the version shipped in Fedora Extras doesn't even do Theora. And I had to rebuild some other things as well, because the server runs RHEL4.

Ever since then, the streams have been rock solid. Ward, a friend of mine who know works at the FSF, set up a mirror on gnu.org because the GNU people want to follow tomorrow's GPLv3 discussions. See, Fluendo is not completely evil after all!

Tomorrow I am giving a presentation on Flumotion in the Babbage hall at 12.00 local time, which is 15.00 UTC. Open http://stream.fluendo.com:8000/babbage.ogg in your Theora-enabled player (hint: try Totem) to tune in.


Filed under: General — Thomas @ 03:18


I arrived late last night in Porto Alegre and was welcomed at the airport exit by Fabricio and Felipe, with a sign with my name on. They promptly dropped me off at the Comfort Inn where I crashed on the bed after 24 hours of travelling.

I spent today writing slides, helping Paolo with some last-minute Flumotion configuration for the streaming, and wrestling with X.org in FC5 and projectors. It's 2006, yet I'm expected to read man pages for X.org drivers to figure out how to a) get my CRT output working and b) get it to work in a resolution other than 848x400 (that was definitely a first for me). Before FC5 this "just worked" when I hit FN-F7 on my Thinkpad, but now it seems this is a feature that needs enabling. Good thing I took some time to test that today.

The people organizing FISL have been very friendly and helpful. It looks like at least 5000 people will show up, and it's a pretty big place with 7 conference rooms and a big hall.

My talk on GStreamer 0.10 is tomorrow at 12.00 local time or 15.00 UTC. It should be streamed if you want to watch it - the Icecast relay page for the Flumotion streams is http://stream.softwarelivre.org:8000/, and my talk is in the Babbage room.

Of course, if you're already here at FISL, it's probably easier to just drop by.


Filed under: General — Thomas @ 03:29


I just received confirmation of my ticket to FISL 7.0 in Porto Alegre, Brazil.  If everything goes according to plan, I will be there to give two presentations - one about GStreamer and one about Flumotion - though the latter one now seems to have disappeared from the website.

I seem to be in some illustrous company, so I should make sure I do well if I manage to get there.

People I am sure I will run into over there are Johan Dahlin (we can have ourselves a little Fluendo starters reunion), Jeff and Pia, Nat and Miguel, and Lucas Rocha, as well as Pablo and Fabricio who got me there.  I don't know if it's still going to happen as planned, but the idea was that a lot of the rooms would be streamed live, and some of them with simultaneous translation, to have Spanish, Portuguese, and English.  That would be pretty cool.
If you're there, let me know if you want to discuss about GStreamer, Fluendo, Flumotion, GNOME, Fedora, or anything else.  I have no idea what to expect, except that the schedule looks good, it seems there will be a lot of people and it can only prove interesting.

Gallery Upgrade

Filed under: General — Thomas @ 08:52


So, I've been delaying a certain problem for a few months now, hoping that any of my fellow monkeys at Apestaart would address the issue first. Of course, they were doing the exact same thing. And I guess I'm the first to cave in.

The issue is simple - our previous server was running Fedora Core 1, and I had a hacked-up Gallery 1.3 install in my website. Some of the others also were running various Gallery versions. At some point, our hosting company went bankrupt and got taken over by another one, and in the process we migrated to a Fedora Core 4 server. That migration was mostly succesful, save for two problems - Gallery 1.3 doesn't work with PHP 5 (the version shipped in FC4), and all my personal CVS history was deleted.

Having more or less dealt with the second issue before, it was now time to attack the first. Have I mentioned before how much I hate web software ?

So, after browsing the docs for Gallery, and noticing they have a largely rewritten Gallery2 which looks very nice, has unit tests (!), and seems to be decently put together, I started looking for upgrading documentation. And after some puzzling, it seems that my best bet is to upgrade from 1.3 to 1.5, then verify integrity, and then jump to version 2.

There's one slight problem - for the upgrades to work, I need to actually verify the current version works, and then run the upgrade to 1.5 through PHP - but the current site doesn't run on PHP5. The images take over 5GB at the moment, so copying everything over to a different machine and do the upgrade there isn't feasible either.

While pondering if I should rebuild apache and php by hand, it hit me that I could just use mach to set up an FC3 chroot, install apache and php, copy my site into the chroot, run apache on a different port, and do the upgrades step by step. Ten minutes later, I had completed the first step of the upgrade.

For future reference, here's what I did:

yum install mach
mach -r f3c setup
mach -r f3c yum install apache php vim-enhanced
mach -r f3c chroot

- copy site into chroot, change /etc/httpd/conf/httpd.conf to run on port 8080 and point to the copied site

httpd -X

(because doing 'service httpd restart' would make it kill the host's httpd as well)
- access the site, notice that it stops httpd, check the log and figure out why

cd /dev
mknod random c 1 8
mknod urandom c 1 9
httpd -X

- access the site again, notice that everything works except logging in
- edit php.ini and turn register_globals On, login then works
- overwrite current gallery with gallery-1.5.2pl2
- go to site, notice gallery tells me to upgrade, but that gives me a blank page
- edit config.php, remove some of my customizations, redefine some vars, run again, upgrade now works
- turn off register_globals (because the upgrade wizard then complains about it, good)
- notice errors in the config, and:

yum install netpbm-tools unzip

- Finish the upgrade wizard
- go to gallery page and see the "httpd -X" crash again
- look at error log, notice it ran out of memory, and update php.ini to use 32M instead of 16M
- access site again, Gallery informs me my albums are out of date and I should upgrade them, which I do
- after some waiting, the upgrade is done, and (beside the horrible theme) my gallery seems to be ok, just like before
- go to tools/find_orphans.php, repair
- go to tools/validate_albums.php; this ran fine

At this point, I had a working Gallery 1.5, and it was time to move the whole tree back into the original host's web directory, and finish the migration to Gallery 2.1 there.

- use the multisite option to put a gallery in my website dev tree
- create MySQL tables (Gallery 1.3 worked completely database-free, but this is not possible anymore - too bad)
- disable GD as requested by the upgrade manual
- create test album, upload test photo, notice thumbnail missing
- this is because by disabling GD, none of the graphics toolkits were activated. Activate ImageMagick
- Gallery warns me about a vulnerability, which it links to. Nice ! I double-check if my ImageMagick RPM has a patch for this (rpm -q --changelog ImageMagick) - it does: "fix a denial of service in the xwd coder (#158791, CAN-2005-1739)"
- proceed with this version
- recreate thumbnails, twiddle with settings, until there are thumbnails for the test photo

At this point, Gallery 2 is working correctly, and now it's time for the big upgrade. MAKE SURE YOU HAVE A BACKUP.

- For the import, increase your PHP memory limit. I used 64M (because an initial run with 16M stopped running after a minute, leaving me with only part of the albums imported, annoying)
- In Site Admin, choose "import from Gallery 1"
- I chose to set Title from blank, and Summary from Caption (because a test import had some captions that were too long to serve as title and got truncated)
- Nice progress bar, everything works well, and the upgrade finishes with around 33MB used for close to 4000 pictures.

All in all, this worked a hell of a lot better than I expected it to. Gallery is a pretty impressive web application, and the user experience I got from it was amazing - I was able to upgrade from a version from 2002 all the way to the latest without too many problems. I don't think I've ever seen a web app take this much care of its users.

Next on my list - migration of Rombocop and other Apestaart sites with Gallery.

Next Page »