Search Results: "agi"

3 August 2007

Eddy Petrișor: more news from the nslu2 front

The main reason for the lack of activity during this week was that I had some problems with my router, a NSLU2 running the debian arm port. This was the machine I wanted the softfloat rrdtool I was talking about in these 2 posts.

It turns out that for some weird reason the USB controller of the slug resets when there is too much traffic going on. I got lots and lots of messages like:


$ grep reset -A 1 /var/log/syslog grep -E '(reset repeated)'
Aug 3 07:02:27 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
...
Aug 3 11:50:29 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 11:51:03 ritter last message repeated 4 times
Aug 3 11:53:15 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 11:53:46 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 11:55:48 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 11:56:07 ritter last message repeated 2 times
Aug 3 11:56:52 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 11:56:57 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2



That wouldn't have been a problem as long as the damn thing worked, but in some cases after the reset the root filesystem was lost and all the services running on the machine died (except the networking itself since all of that is part of the kernel and is loaded in memory).

It took me about three evenings to get to this conclusion (imagine being locked out of a machine which advertised running ssh, http, and dns services, being able to telnet and getting a respons, but the full protocol failed).

It all became more clear when, while being connected via ssh I got his result:

eddy@ritter ~ $ ls
-bash: ls: command not found

"WHAT?" was the first reaction, then I figured that life without ls is unbearable and came up with this bit:

alias ls='for I in * ; do echo $I ; done'

Quite cool to understand a little bit about the system. Still, cat was unavailable so having /proc and /sys available did not help that much. At some point I was thinking about a busybox shell, tried that, it didn't work since it wanted to remove some important bits like the initramfs tools.


I googled again and found a good starting point for a discussion of the same problem someone else was having. I ended up trying all the proposed solutions: rmmod-ing ehci-hcd, blacklisting the module, regenerating a initrd image with the blacklisted module... None of these worked (individually) and I ended up having an even more unstable system when ehci was not present (I was loosing the root FS after aprox. 1 min after logging in remotely immediately after start). Restoring the image with ehci was a pain (not to mention the time spent trying to figure a way to revert the change safely, since bricking the machine was not out of the question - imagine loosing the FS while flashing the ram drive image).

I finally managed to revert the ehci enabled image and tried the workaround proposed in this gentoo BR. I tried 128 and now I am at 64 and I am still getting those resets; Still something good came out of this, I followed Michael Prokop's Use root=UUID on NSLU2 article and I think I have now a stable root file system just thanks to him.

Now I am stuck:


grep -E '(max_sect reset)' /var/log/syslog
Aug 3 07:02:27 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 08:27:38 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 08:38:43 ritter manual message: max_sectors was set to 128
Aug 3 08:55:25 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 09:31:47 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 09:54:11 ritter set_max_sectors: max_sectors was set to 128
Aug 3 10:09:32 ritter set_max_sectors: max_sectors was set to 128
Aug 3 10:15:27 ritter set_max_sectors: sda's max_sectors was set to 128
Aug 3 10:24:24 ritter set_max_sectors: sda's max_sectors was set to 128
Aug 3 10:38:12 ritter set_max_sectors: sda's max_sectors was set to 128
Aug 3 10:47:04 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 10:48:27 ritter set_max_sectors: sda's max_sectors was set to 64
Aug 3 11:04:36 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
Aug 3 11:06:16 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2
....
Aug 3 15:05:58 ritter kernel: usb 3-1: reset high speed USB device using ehci_hcd and address 2

Should I try setting to 32?

In case you're wondering, I am doing the setting with this script:

#!/bin/sh

MAX_SECTORS=64
DISK=$(ls -l grep 'uuid.* / ' /etc/fstab awk ' print $1; ' sed 's#.*/\(.*\)$#\1#' tr -d '[0-9]')

[ -z "$DISK" ] && logger -t 'set_max_sectors' "error: could not detect root disk" && exit

echo "$MAX_SECTORS" > /sys/block/$DISK/device/max_sectors
logger -t 'set_max_sectors' "$ DISK 's max_sectors was set to $ MAX_SECTORS "

exit 0


Dear (not at all) lazy web, what can I do to fix/workaround this issue? Any help would be gratly appreciated (personal mail or comments).

Note: I am reluctant to try the fix proposed in the last comment that claims to fix the issue since compiling an arm kernel natively is a pain and I would like to have an official kernel from Debian Etch, as I do now.

Bastian Venthur: Implement two features and get the third for free!

Today I’ve implemented a feature which was long overdue: making the table sortable by the available table headers. The second feature I’ve added is that every bug report now has it’s “Last Action” date. While both features are useful for themselves, combining both result in a very handy bug triaging tool. screenshot.png A few months ago when I was trying to help the KDE team on their bug triage, I’ve missed the feature to sort bugs by their date of the last action in our BTS since I’ve noticed that many of the very old bugs (last action-, not bug number wise) where already fixed or could be closed for other obvious reasons. The problem was just to find all those “stale bugs”. I was able to close dozens of old bug reports but it took much more time to find them, than to decide whether they’re still active or not. And since I hadn’t the tools available to find the “easy targets” on a quick way, I gave up after a few days. Today it’s just as easy as firing up rng and let it search for all bug reports belonging to the qt-kde team: rng debian-qt-kde@lists.debian.org and sorting the resulting list by last action… sweet! The package was just uploaded and should be available tomorrow. Update: Don pointed out that you can get the ordering in the web interface too by appending ordering=age to the URL. Neat.

John Goerzen: Haskell Fun

Bryan O'Sullivan noted over at the Real World Haskell blog that Haskell made quite the impact at OSCon. And I can attest to Simon Peyton-Jones having trouble leaving the building because of all the people that wanted to talk to him about Haskell. It was interesting to think about "why now" for Haskell's popularity. Bryan's post has links to the video of Simon's talks, which are great. (Sample quote: "Oh look, a whiteboard has appeared as if by magic! What joy!")

I followed Bryan's link to the Haskell/OSCon-related blog posts at Technorati. Here's an interesting one by chromatic, who gave some Perl talks at OSCon. Favorite quote:

I sat next to Nat Torkington at the tutorial. He kept rubbing his temples. At one point I leaned over and said, The interesting thing about Haskell is that its functions only take one argument. He turned green.

In all seriousness, well-factored Haskell code resembles well-factored Smalltalk code: if you have functions (or methods) longer than a handful of lines, you re probably doing too much. Lower level languages such as C rarely give the opportunity for composition and abstraction that you can get out of functional languages. The presence of pure functions functions which never change global state and which return the same output for the same input is also immensely important.

It s actually the combination of the two features which give these languages such power. When Haskell forces you to mark impure functions explicitly, it gives you tools to isolate behavior which can change global state in the smallest possible scopes, and prevents you from composing impure and pure code together accidentally. When Haskell lets you compose functions into larger functions, not only does it help you write code more concisely, but it provides well-defined units of behavior which work along well-defined and isolated boundaries.


So what is this business about Haskell functions taking only one argument? Let's look at a quick example. Say I wanted to write a function to multiply two numbers. I'd write:

mul a b = a * b

I could give the type of this function like this:

mul :: Int -> Int -> Int

You could read that as "mul takes two Ints and returns an Int". And you can think of it this way. But you could also write the type this way:

mul :: Int -> (Int -> Int)

It means the exact same thing and is valid to Haskell. To read it, you'd say "mul takes an Int and returns a function that takes an Int and returns an Int." And truly this is what Haskell functions that take multiple parameters are doing. Now, I can say:

fifteen = mul 3 5
mulByThree = mul 3
fifteen' = mulByThree 5
fifteen'' = (mul 3) 5


mulByThree has type Int -> Int; it's a function that we got by simply not applying "mul" to all its arguments. fifteen'' illustrates what is going on internally when you write "mul 3 5". It turns out that being able to call a function with multiple arguments is just some syntactic sugar to Haskell.

This is a tremendously useful feature. For instance:

filter (>= 10) [1..20]

I've applied >= to only one argument here. That's fine; it returns a function that's exactly what filter wants.

I've been watching the video of Simon's Taste of Haskell talk. I could *hear* when the audience grasped the utility of this because there was a collective "Oooooo!" from them.

By the way, Haskell has type inference, so I didn't have to give types at all. Oh, and you can also refer to the function itself by not giving any arguments.

mul = (*)

This is one small reason I like to say "Haskell manipulates functions with the same ease that Perl manipulates strings." Mind-bending, isn't it?

Raphaël Hertzog: Thanks sam!

I really appreciated your last Bits of the DPL. I discover a DPL taking position on hot topics of the moment. I’m glad to have a DPL who is trying to fulfill his duty of leading discussions amongst developers. He gave his opinion on the current vote about “endorsing the concept of Debian Maintainers” (he’s in favor because it dilutes power) and also about Apt’s change to install Recommends by default. I’m glad to hear the encouraging news concerning volunteers for ftpmasters. By the way, if you have voted for Sam, and if Sam’s opinion bears any importance for you, you still have until saturday midnight (UTC) to change your vote if you wish so (like Russ did). Right now, only 289 DD have voted.

1 August 2007

Russell Coker: Advogato and Hateful/Divisive Posts

Firstly for the benefit of people who haven’t heard of it, the Advogato FAQ and the Wikipedia Page describe what Advogato does. Pete Zaitcev posted a strange article about me to Advogato. In it he accused me of “pumping hateful leftist propaganda into Advogato“, said propaganda being my regular blog posts. In an addendum he accused me of insanity, and said that my “attacks” were “divisive“. I considered writing an Advogato post in response but first read the Posting Guidelines which say: Both of those criteria rule out Pete’s post and any response that I might make would risk being in breach of such conditions - so I will use my blog as the Advogato admins recommend. Pete’s ad-hominem attack on me claiming that my posts are hateful is bizarre. Pete, for the benefit of all the interested onlookers could you please inform us which of my posts you consider hateful and why you have such an opinion? As a general rule you should always cite articles that you reference. When you make accusations without any evidence to back them up it makes you look bad and prevents any positive discussion of the acts in question. As for the accusation of being divisive, that only happens when people are forced to choose sides. For example when you encourage other people to rate me down on Advogato because of my political opinions that can divide the community (in a small way, neither you, nor me, nor Advogato is important enough to cause a serious problem in this regard). The idea that I was intentionally pumping anything into Advogato was also strange to me. When I entered the URL for my blog into the Advogato settings page I didn’t even realise that it was being syndicated until I reviewed my web logs some time later. It seems that Advogato only has a small number of readers, a recent post about strange ZCAV performance included a graph and judging by the referrer tags it seems that 412 people read the post from Advogato out of 10468 total (so Advogato gets less than 4% of my readers). Planet Debian seems to get more than 15x the number of readers of Advogato. Incidentally if you don’t currently include images in your blog the reader tracking ability is one reason for including an image in an occasional post. Another strange ad-hominem attack was the reference to “college indoctrination“. When I was in university I supported the Liberal party (the Australian equivalent of the Republican party in the US). The influence of Linux programmers (including some of Pete’s colleagues at Red Hat) had much more of an effect on my political opinions than that of my university experience. I am not criticising Pete for disagreeing with me in regard to politics (I don’t even know what he disagrees with). Here are my specific criticisms of Pete’s behaviour:
  1. Ad-hominem attacks

  2. Encouraging mis-use of Advogato trust metrics for political reasons (this one may not have been deliberate)

  3. Non-specific accusations which do not allow me to either defend myself against the accusations or change my actions if he turns out to have any reasonable points

  4. Hypocrisy - he breaks two of the posting guidelines for the purpose of criticising my blog posts which supposedly break some unwritten rule

  5. Not reading the Advogato FAQ - it has a specific section about political disagreements
But I’m not going to advocate voting him down on Advogato. He does write some interesting things on occasion. Check out his page on guns for example.

30 July 2007

Steve Kemp: That I can't show you how

Russell Coker has recently started posting random tech-tips and recipes in his blog :
To improve things in this regard I plan to increase the number of posts I write with solutions to random technical problems that I encounter with the aim of providing a resource for google searches and to randomly inform people who read my blog.
This is nice to see on Planet Debian - although I hope we continue to see the personal entries. For anybody else who is considering posting things like this I would be delighted if you'd copy them to the Debian Administration website. There have been numerous times when I've been just about to write something on a topic, seen it posted elsewhere and figured I shouldn't do so: (Notable examples off the top of my head: Introduction to OpenVZ, Introduction to GIT, several Xen pieces.) I don't get many submissions, which I'm getting resigned to, but it is easy and people really really are greatful for new posts. In other news linuxlinks.com are a bunch of spammers and will be reported as such. I utterly fail to care that they've added "my software" to their list; if I cared I'd join their site and agree to receive emails from them..

28 July 2007

Martin-Éric Racine: Localisation beyond language packs

In my previous post, I briefly mentioned my K750i Sony-Ericsson mobile phone. I received it as a birthday gift this year, to replace my aging but trustworthy Nokia 3210 and, as with any multifunctional digital device, there was a learning curve during the adoption period. While some features were gladly and swiftly taken into use, some of the handset's usability issues became my pet peeve and, among them, the localization pack wins the jackpot. First, let's make one thing clear: I fully understand that memory constraints prevent manufacturers from including support for every language known to man, so a handset can only be loaded with a limited set of languages for the User Interface and for T9 predictive text input dictionaries. My issue is with the concept of grouping languages by linguistic families or continental areas, when compiling the localization packs for those handsets. In this particular case, I had a choice between the Baltic or Nordic packs. The former has UI language support for Estonian, Latvian, Lithuanian, Polish, Russian and Ukrainian, while the later has support for Finnish and the Scandinavian languages; English is also included in both cases. T9 support is a strangely mixed bag: the Baltic pack only includes predictive input for the Slavic languages, while the Nordic pack supports all the languages of its UI. What's my problem with the above language combinations? For starters, I'm in Finland. We don't interact with Danes or Icelanders outside very occasional pan-Nordic meetings and that mostly concerns politicians. Meanwhile, average Finns travel for work and play to Estonia and Russia on a fairly regular basis, which makes sense, since they are neighboring countries. However, available language packs don't take this into account. How should this be resolved? Either language packs are produced with specific countries in mind, rather than generic geographic areas, or the users should be allowed to freely mix and match among all available languages and get the result flashed into their handset at purchase time. The K750i language pack for Finland should therefore include: Finnish, Swedish, Estonian, Russian, English and Norwegian (essentially the current Nordic language pack, but with Danish and Icelandic replaced with Estonian and Russian). Then again, this only covers official state languages. Sam dialects, anyone? I guess not, because we'd soon be exceeding the handset's capacity. Hmm... Thus, the only real solution is to allow people to freely mix and match UI and T9 languages of their choice at purchase time. As a bonus, this would allow me to drop Norwegian and replace it with Joual... ... c lisse, French and finally have a language pack that I can truly find useful. I can easily picture a Transylvanian engineer working in Finland wanting to get Romanian support or a Kurdish immigrant preferring Turkish support instead. Sony-Ericsson, how about it?

Joerg Jaspert: The DM GR

So, let’s join the postings about the currently running Debian maintainers GR. The short text of this post is I am against the proposal as it is right now and think it does more harm than good and so I did vote for Further Discussion. See below for a bit more about my reasoning, or just skip if you are already bored. :) The current proposal does look like a “yay, we have an idea thats not really thought through. And we do not want to get it into the currently existing procedures, that would involve more work and discussions. And anyway, everyone is ranting about the current procedures anyway, so lets take that bad mood against it to get this done”. (And yes, this is a bit exaggerated, so don’t take it personal, please). As you may have noticed I wrote that I am against the current proposal when it first was on vote. I was mostly on vacation back then and didnt want to read the whole thread, so I stayed mostly quiet. I am not against the DM concept itself. I am against it being seperate to the existing NM procedure. For me a proper solution has to be integrated with the existing procedures, not seperated. The main reasons why some support this proposal seem to be
  1. Slow NM process.
  2. Someone doesn’t want to go through NM
  3. Someone doesn’t want to be in the Debian community

Slow NM process I am part of this, and not a small one. And yes, I feel (very) bad about it, but already think about ways this can be changed, after I got the current backlog done. Anyway, for this DM thing my backlog isn’t the main reason that people feel NM is slow. It seems to be the general “I have to wait for an application manager and then answer to a lot of questions and between that wait and wait and wait”.
True. People have to wait at some points, and those waiting periods can be frustrating. We should do our best to eliminate those waiting places. The other point is that of the lot of questions. Yes, we have a really big set of questions in the templates, that cover a whole lot of the possibly areas a future Developer can work in. And most of those questions got added after a large set of existing Developers showed that they completly do not know something. That way the templates are constantly growing and still intend to give the future Developers the possibility to learn about things in Debian they might never have heard about. And there is the thought that, if you read about a topic and had to answer to it in the past, you will at least remember that there is something if you encounter it in the future. But - there is also the fact that an AM is NOT forced to use the templates for their process. AMs are, and have always been, free to do the process on their own. There are some questions every AM has to ask, but thats a minority. If you look at the templates you will spot the needed ones easily. Other than those every AM can freely do whatever he wants to do with his applicant (as long as the applicant agrees to do that stuff and its legal :) ). The AM only has to keep the following in mind: Both, FrontDesk and DAM, usually do not work together with the applicant. They might have heard the applicants name at some point, in some bugreport or some packages Maintainer: field. But they usually did not interact with them. Which means that the AM has to make sure that FD and DAM are able to build up their opinion of the applicant just by reading the mailbox of the AM->NM communication. Which usually means: read between 20 - 70 mails of a communication someone else had before you decide if someone should or should not enter Debian. (Leaving alone checking packages.qa, lintian, bug lists and a bit of google).
Someone doesn’t want to go through NM Erm. Well. Then use sponsors for your packages. Or is it because you think NM is too hard? NM isn’t that hard, everyone that can read and write english texts (even if the english is bad) and use google is able to pass NM. (For the bad english - if you fear joining NM because of that: Well. If I go and reread my own report from back when I joined - ugh. I hate my english. And I know native people still hate my english texts, its named en_GANNEFF for a reason. :) It is not necessary for your English to be perfect; you only have to be able to make yourself understood. If an AM doesn’t understand what you wrote they can simply ask for clarification). DM also doesn’t help for people that don’t want to pass NM. They have to pass the advocate, the ID check and the same minimum set of of questions NMs have (as written a bit above). So you already have a large part of NM for the future DMs.
Someone doesn’t want to be in the Debian community Then they shouldn’t be able to upload on their own. They can use sponsors. After all the only thing you must do as a DD is to read debian-devel-announce. And thats something a DM also must do, or you can’t seriously consider to package anything. And then DD only adds rights for you, like taking part in votes and so expressing your opinion and getting things changed in Debian that you may not like.
How to integrate a concept of DM then? First - by starting in the right area - getting it into the NM system by talking to all those involved. There is FrontDesk, DAM and also the NM-Committee, the latter should be the right point for a proposal and discussion. What I can imagine that would work and do something good is a system integrated into NM that gives future Developers upload privileges after they passed a few steps with their AM. That way they can upload early in the process, which can then be part of the T&S set, and the following steps in their NM process “just” slowly add more rights to the NM until its the set of rights every DD has. Seen from the current layout of the process it would be somewhere after the ID check and the first set of P&P, ie. at the time the AM sends the second P&P part. After that point the AM could recommend to those maintaining the DM list that the applicant should be added to it, together with a list of packages where the applicant is allowed to upload them. The maintainers of that DM list could be FrontDesk + DAM + maybe someone else, but thats something to discuss. And list of packages - while one could take the current limits the GR wants to set or simply a plain list, that can be amended during the time someone is a DM. Now, one can add a turnoff for people that do not want to pass through the rest of the process at this place. Im not sure its such a good idea, but thats something one can discuss. But if so it should be attached to some rules like - must read our debian-devel-announce list, is included in regular pings of activity similar to the wat ping.

27 July 2007

Michael Prokop: Setting up your own jabber server: ejabberd

It was on my todo list since ages, finally I took some minutes to set up my own jabber server (reach me at mika@jabber.grml.org). I’m using ejabberd, a free and open source instant messaging server written in Erlang. Reference system: Debian etch (current stable), ejabberd version 1.1.2-6, installed via a simple:
# aptitude install ejabberd
Adjust the hostname in /etc/ejabberd/ejabberd.cfg (I suggest to use something like ‘jabber.$YOURDOMAIN’ so you can update jabber’s DNS SRV according on upgrades, downtimes, moves,…):
 hosts, ["jabber.yourdomain"] .
Register an account:
# /etc/init.d/ejabberd restart
# ejabberdctl register username jabber.yourdomain password
You might want to give your username admin permissions, so adjust /etc/ejabberd/ejabberd.cfg according:
 acl, admin,  user, "username" .
That’s it. If you want to disable registration of users just use (instead of the ‘allow’ line):
 access, register, [ deny, all ] .
Restart the server and make sure you have a running server:
# /etc/init.d/ejabberd restart
# ejabberdctl status
Now you should be able to point your browser to http://yourdomain:5280/admin/ and set up your new jabber account inside your jabber client.

Wouter Verhelst: Dear lazyweb,

When learning some code I didn't know before, my usual way to get familiar with it is to first find some documentation or a kind spirit to help me understand the big picture, and then to run the code in a debugger or to do something like '/bin/sh -x', or some such, so that I can understand how it actually flows. That works pretty well with most software. One of the things with which it does not work, however, is gcc's .md files. As far as I know, there are no debuggers for those files; and even though Simon helped me understand a few things about it at Debconf, I'm still not confident enough to just start editing stuff. Additionally, just randomly editing a 7k+ LOC file and expecting those edits to magically work is not something I consider very likely to succeed. So, dear lazyweb: how does one debug gcc's .md files?

MJ Ray: Debian Maintainers

I've voted in favour of the Debian Maintainers GR because, despite flaws like micro-managing the initial situation [Sven Mueller], I believe it is a useful step towards reforming the New Maintainer process. Those of you with long memories may recall that I think NM should be a modern portfolio-based qualification [-project, April 2006, but probably not the first time I explained it] instead of the current, inconsistent AM-dependent one which sees good people applying too early and sometimes being turned away, sometimes being accepted too quickly, but most often sitting in DAMnation. Despite some claims to be interested in fixing NM [Raphael Hertzog], it seems the current NM team requires throwing more people at the buggy system [Raphael Hertzog] before even considering fixing the damn bugs. Of course, I suspect any suggestion would be met with a claim that NM then wasn't performing too badly, now that it had more people. I think that's damage, so I hope the DM GR can be a first stepping stone in a new path to becoming a DD which routes around the damage.

Jeff Bailey: Whirlwind trip

So this is it, I've actually finished at Canonical! For most of the past week, I've been in Portland, OR at Ubuntu Live. I gave two talks (Ubuntu Technical Demonstration and Bringing your software to Ubuntu users) and one tutorial (packaging for Ubuntu and Debian derived distributions). I had a great time, and was glad to get a chance to see my former coworkers one last time. I'm happy to be leaving on great terms with my former employers, and hope to be at UbuntuLive again next year.

This conference was a whirlwind of meeting people. JP, Teri, Jim, Andy and MaryBeth are people I'm really looking forward to seeing in the bay area when I get there; I got to see Steve and Patty in the Debian booth; I managed to go for dinner with Chris and Leslie; A going away party that included many of the above plus Matt, Steve, Etienne and Torsten; I had lunch with Katie, whom I haven't seen since my wedding; I had another lunch with Mermaid, whom I thought had fallen off the face of the earth; my final lunch at Veganopolous included MaryBeth again and Rob. I did miss seeing Kamaya, which is sad, though. I got *almost* everyone I wanted to see.

It's a crazy list. Some of these people will be random business contacts. Some of these are folks that I feel like remeeting them after several years was like only missing a day. Some of these are people I miss already.

Sabrina and I are making the trek up north to Kit and Hannah's wedding. We're staying at Miriam's and had lovely Ethiopian food.

Time to sleep. 7am is going to come too early.

26 July 2007

Russell Coker: A Support Guide for Xen

Here’s a guide to supporting Xen servers for people who are not Linux experts. If your job means that you have root access to a Xen server that someone else installed for the purpose of fixing problems when they are not available then this will help you solve some common problems. Xen is a virtualization system that is primarily used for running Linux virtual machines under a Linux host. It is mostly used as a Paravirtualization system in that the virtual machine knows that it is running in a virtual environment - this allows some performance benefits. The host environment is known as Dom0 and root in that domain has the ability to control the other domains (which are known as DomU domains). If you perform an orderly shutdown of the Dom0 (via the shutdown or reboot commands or notification from the UPS of an impending power failure) then when the machine is booted again the DomU’s will be automatically restarted (if the on_reboot setting has the value restart - a common configuration). If you run the command shutdown in a DomU then the domain will be destroyed, and the command reboot will restart the DomU with the same settings - if you want to change the settings for a DomU you need to shut it down and create a new instance. The main sys-admin command related to Xen is xm. Here are the main xm options that are useful in support:

  1. xm list provides a list of running domains. For each domain it gives the name of the domain, the ID number, the memory allocated to it, the number of virtual CPUs allocated to it, the state, and the amount of CPU time used in execution. The ID numbers are allocated sequentially, if you reboot a DomU by running the command “reboot” inside it then it will get a new ID number when it re-starts. Many xm operations that may take the name of a domain will also take a Domain ID number. Generally you never use an ID number and ignore it - the only relevant thing about an ID is whether it is 0.
Here is a sample of the output of xm list:
# xm list
Name        ID Mem(MiB) VCPUs State  Time(s)
Domain-0    0    1236    4 r---–  14116.3
wind        13    2999    3 -b----  60114.1
wind-f7    52      519    1 -b----  3329.9 You can see from this output that the domain named wind has 2999M of RAM, 3 virtual CPUs (out of 4 physical CPUs in the machine) and has 60,114 seconds of CPU time used (that is 114 minutes of CPU use - the equivalent of almost two hours for a single CPU). Here are the values you might see in the state field (from the man page xm(1)):

If you see domains that are running which normally aren’t busy then make a note of this. If you see domains that are paused, crashed, or dying then contact the sys-admin. Also know which domains are expected to be running so that if a domain is missing then you will recognise it as a problem!

  • xm top is similar to the top command in Unix but displays Xen data, by default it displays the same information as xm list but also includes the amount of data read and written from network devices and disks. If your terminal is less than about 145 columns wide the lines will wrap and it will be confusing - stretch the width of your xterm before running it.
  • If you have multiple network interfaces then you can see the transfer counts for each of them separately by pressing the N key. If you have multiple network interfaces in DomU’s then this can help diagnose some network problems (although you may find that tcpdump is more useful). If you have multiple disk devices in a DomU then you can see their transfer counts separately by pressing the B key. One problem that can be partially diagnosed through this is excessively poor performance. If a DomU is running extremely slowly then it may be impossible to login to diagnose and/or fix the problem (it could take tens of minutes to login), in that case seeing where the disk access is going from outside the DomU can shed some light on the problem. VBD  768 [ 3: 0]
    VBD  832 [ 3:40]
    VBD 5632 [16: 0]
    VBD 5696 [16:40] Above is the identification of the virtual devices /dev/hda and /dev/hdb in a DomU. The numbers inside the brackets are the device node numbers in hexadecimal, so 16:40 means the device 22,64 as a pair of decimal numbers (22*256+64=5696). # ls -l /dev/hd?
    brw-r---– 1 root disk  3,  0 Jul 23 17:24 /dev/hda
    brw-r---– 1 root disk  3, 64 Jul 23 17:24 /dev/hdb
    brw-r---– 1 root disk 22,  0 Jul 23 17:24 /dev/hdc
    brw-r---– 1 root disk 22, 64 Jul 23 17:24 /dev/hdd Above is the result of a ls -l on the devices in question from inside the DomU. When I set up a Xen DomU I generally use /dev/hda for the root filesystem and /dev/hdb for swap. So if the machine is performing poorly and /dev/hdb ([3:40]) is being accessed excessively then it indicates that the machine has some memory hungry programs running and is paging heavily.
  • xm list –long [domain] gives detailed information on all domains, or it can be run with the name of a domain such as xm list –long wind to give the detailed information on only one domain. Generally this is something that you will log to a disk file before restarting domains, in the short-term there is little use for this.

  • xm console <domain> gives you the console of a domain. If a domain is not working correctly and it is impossible to login via ssh (either due to a network problem or a problem with ssh) then you can access the console (equivalent to a serial-port login on physical hardware) to diagnose the problem. Often the kernel will log messages to the console, such messages will be stored by the Xen system until they are read. If you suspect that there may be many such messages then use script(1) to log the output to disk, if you are unsure then use script to make sure that you don’t miss any data. Even if you don’t understand it the sys-admin probably will!
  • If the system is half-working then you can login as root to investigate problems. You can escape from the console by pressing CTRL-].
  • xm dmesg gives Xen logging data comparable to the dmesg command in Linux. If you ever have to reboot the machine (run reboot from Dom0) due to a problem with Xen then you MUST save the output of xm dmesg to a file for later review by the sys-admin.

  • xm destroy <domain> will kill a specified domain. It’s a last resort for stopping a domain that is not working correctly - it is greatly preferrable to login to the domain via ssh or xm console and give an orderly shutdown.

  • xm create [-c] <domain> creates a new domain. The configuration for the domain will be taken from a file of the same name in the current directory or in the /etc/xen directory - if /etc/xen is not the current directory when you run xm create then make sure that there is no file-name conflict. You can use this command after destroying a domain or to start a domain that was not previously run.
  • If you want to change a configuration option of a domain (such as the amount of RAM used) then the usual procedure is to edit the configuration file, run halt or shutdown from within the domain, and then create the domain again with xm create. Note that the -c option is used to attach to the console after starting the domain (you usually want to do this).
    I will probably update this post when I get some feedback. I may write more posts of a similar nature if there are requests.

    Marco d'Itri: The Debian Maintainers General Resolution

    I voted in favour. People arguing that we should "just fix the NM process instead" are missing the whole point: even if its problems could be fixed soon (but they will not be, since many smart people have been working on it in the last few years and have not found a magic solution yet) I do not believe that becoming a Debian Developer should be easy. OTOH I like the idea of allowing full Developers to delegate co-maintenance of one of their packages like they currently do with sponsorships but without requiring them to rebuild the packages, which can become very time-consuming.

    Joey Hess: voting on sponsorship

    Remember when sponsoring packages was implemented in Debian? Imagine if we had felt the need to vote on whether we were allowed to do that. Instead of just doing it. I'll bet that some people would have argued against, citing reasons such as:
    It appears to me that the sponsorship as sketched in the GR is mainly meant to let NMs upload earlier, i.e. it tries to fix the fact that front-desk or DAM approval take too long. I think the fix for that is just to find someone besides Joerg to also read the AM reports. Sponsees as in the GR are a workaround, not a solution.
    or:
    But the GR micro-manages too much and on the other hand doesn t make the current NM process any easier for Sponsees than for any non-Sponsee applicant to the NM process. Also, like some others said before, I seriously doubt that a big part of the current DD-applicants (i.e. those in the NM queue at some level) would prefer Sponsee status over DD status. What is the difference between a Sponsee and a Debian Developer? Who is interested in becoming a Sponsee and not a Debian Developer and why? Will this Sponsee class really improve the situation for New Maintainers?
    or:
    I suppose most of our New Maintainers will aim to become a Sponsee just to bridge the time until they re full Debian Developers. And I predict that this is also the major target audience for this new Sponsee class. Some people said on -vote that there are people actually interested in becoming a Sponsee and not a Debian Developer. Personally I find their reasons questionable, but after all I suppose there won t be many people going this route. On the other side, I don t see how this new class enhances the situation for the New Maintainers. Now they not only wait for the Application Manager, Front Desk and Debian Account Managers No, now they will also search for someone who sponsors them. So my question is: If this General Resolution mainly helps New Maintainers, why must it be so complicated? Why another class of contributers, all those complicated rules to set it up and this additional layer of bureaucracy?
    or:
    If you think the NM process is taking too long, then it's probably better to help out there rather than to try to create a system to bypass it in this way.
    But instead, we somehow made the enormous change that sponsorship entailed in how Debian works, without voting on it. Make no mistake, it was a big change on both a technical as well as a social level. Now IMHO, the DM proposal is just fixing a bug in the current sponsorship process. The interesting thing to consider is, if this vote fails, how can the bug be fixed without another vote? I personally believe that any DD has the power to fix this without dragging the project through a vote. They may put their status as developer at stake in fixing it, if they take what seems like the obvious approach, but if one feels that this bug in sponsorship is a bad enough bug and is hurting Debian enough, that might be worth it.

    Russell Coker: Train Routing

    Last year I spent several months living on one side of Melbourne and working on the other and travelling by train to work. Every day I had to catch two trains each way with an average wait of 5 to 10 minutes for each train to arrive giving a total of at least half an hour a day spent waiting for trains. The obvious solution to this problem is to have trains not go back and forth on one line but instead go from one side of the city to the other. This map shows that there are 14 train lines out of the city with about 5 major lines. The smart thing to do would be to have every major line have one train every 5 minutes during peak hours and to have every train go back out on a different line. Then if you are on one of the major lines and want to travel out on one of the other major lines then every 20 minutes there would have a train that would take you straight there without changing trains! Currently we don’t even have such frequent trains, during peak hour the trains on most lines run no more often than 5 per hour, the Sydenham line has trains 4 times per hour during peak hours and the trains are crammed full before they get half-way to the city. If the trains ran more frequently and were routed through the city then commuters who travel through the city would save 20+ minutes per day without going to any effort and 30+ minutes a day if they chose to start their journey at a time to avoid changing trains. This would be a significant incentive for catching the train instead of driving! For the commuters who travel to work via a single journey then having trains run every 5 minutes at peak times would mean that an average of 2.5 minutes was spent waiting for a train each way (an average of 5 minutes per day) instead of the current situation of 15 minutes per day or more. This would mean triple the number of trains on the Sydenham line which may sound excessive. However the trains are currently so crowded that there could be twice as many trains and all seats would still be full. If there were three times as many trains then I expect that more people would catch the train (surely some people would be convinced to drive to work by the idea of spending 20 minutes with barely room to stand), it’s not inconceivable that there could be three times as many trains and all seats could still be full! The next issue I have been considering is the time taken for a tram ride to/from the central city areas in peak hours. Peak hour trams stop at every stop because there are always people getting on and off. If a tram could stop less frequently then it could make a slightly higher average speed. One way of achieving this would be for the peak hour trams to stop at every second stop outside the center of the city. On the way in half the trams would accept passengers at each stop (each tram would be designated as either odd or even and labelled as such - the tram stops are already numbered). But if you have twice as many trams then the average wait would be the same while the duration of the trip would be reduced. On the way out of the city the tram driver would announce that after stop 10 (to pick a random number that might work) the tram would only allow passengers to get on or off at even/odd stops. If you knew that your stop was on an even number and the tram was an odd-numbered tram then you would change trams to an even tram. The small delay in changing trams would be made up by a faster trip overall. Politicians are always talking about ways to alleviate the water shortage caused by climate change and to improve the economy. Having people spend an extra 10 minutes a day working because of saved time on the trains would help the economy. Encouraging people to catch the trains via more frequent and efficient service as well as less overcrowding would help reduce climate change - which is the best way of improving our water supply and the only way of helping the farmers long-term!

    Christoph Berg: The DM GR

    I haven't said anything in the DM threads yet because I still don't know which actual problem the introduction of DMs is trying to solve. IMHO the current process with sponsors reviewing and uploading packages has proven to work nicely, i.e. the amount of broken packages uploaded is not too high. Most of the perceived problems with this process stem from the fact that most of the packages offered on debian-mentors or #debian-mentors are initially crap and need lots of review cycles. Once people produce good packages asking the last sponsor for another upload should work. (And at that point NM will be a breeze.) Particularly I don't like the fact that the "initial policy for an individual to be included in the keyring" does not include any check of any technical or non-technical skills besides having a gpg key and be able to tick 3 checkboxes. I fear this will lead to people blacklisting "DM" packages because they don't want low-quality packages on their machines. At the same time, the rest of the GR text is micro-managing every other detail of the process in a way that doesn't leave much room for practical implementation decisions. It appears to me that the DM concept as sketched in the GR is mainly meant to let NMs upload earlier, i.e. it tries to fix the fact that front-desk or DAM approval take too long. I think the fix for that is just to find someone besides Joerg to also read the AM reports. DMs as in the GR are a workaround, not a solution. On a sidenote, I'm still wondering why front-desk (and afaict the DAMs) were never asked about their opinion while/after the GR was drafted. I had some chats with Anthony on IRC on the topic, but that was shortly after Debconf 6 (there was a related BoF), nothing in the past months. (not with the front-desk hat on, but having it within reach) PS: I voted "-1".

    25 July 2007

    Adam Rosi-Kessel: Netflix Outage

    Netflix was offline for nearly 24 hours — almost weeks in Internet time for a business whose entire existence is online. It was astonishing, at least to me, that a major Internet service could be disrupted for so long. According to my people on the ground in San Francisco, a transformer explosion was the cause. It’s a good reminder that the Net is more fragile than we might think. UPDATE: the original source in California recants. The Netflix outage remains a mystery. Explanations are welcome.

    24 July 2007

    Adeodato Sim : On becoming $something

    One and not uncommon way of granting privileges or positions to somebody else is waiting until it’s obvious it’s time to. As in, for example: “Oh, you don’t have commit access already? Here, let’s fix that.” Or: “Oh, you’re not a release assistant already? Here, have fun.” It’s not useful, however, when there aren’t any people spontaneously jumping into doing some of the required work. Anyway, the point of this post was to say that I can imagine myself applying this method in some non-free-software areas of my life as well: “Oh, we’re not married already? Here, let’s fix that… tomorrow.”

    23 July 2007

    Ross Burton: Katachi Update

    It appears that some people actually want to see Katachi in action before they try it. I can't imagine why, it only requires two libraries to be installed from version management, both of which are slightly obscure. So, here is a screenshot. Katachi Also some other people don't know where to get GVFS and GtkImageView from. This is the git tree for GVFS, and GtkImageView is here. GtkImageView 1.1.0 should work fine if you fix the trivial compile warnings, so maybe I should ditch my local SVN checkout and use the release for now.

    Next.

    Previous.