vagrant with lxc and libvirt in fedora – reprise

This is just a short follow-up to my previous post on the topic. Through Josef’s comment, I got to know of the existing packaging effort for vagrant and vagrant-libvirt in fedora, but it seemed to have stalled somewhat. With all the problems in getting the upstream RPMs to behave nicely (installing vagrant-libvirt and whatnot), I wanted to give that packaging a serious look and decieded I wanted to try to bring it forward in the light of the upcoming branching for Fedora 22. Here was a real chance to get vagrant into the next version of Fedora.

What should I say? This project sidetracked me for longer than I intended — after all, packaging is always a tedious and time-consuming task. But I did the reviews of vagrant and vagrant-libvirt, thereby doing an update of the vagrant-libvirt RPM to the latest version 0.0.24 of vagrant-libvirt, and I also created a package for vagrant-lxc. The result of the whole effort is that packages for vagrant, vagrant-libvirt and vagrant-lxc are now available in Fedora, i.e. they will be in the next release, Fedora 22. But not only that — all three packages are also available in the updates for Fedora 21 already now!

Continue reading

vagrant with lxc and libvirt on fedora

I recently got interested in Vagrant as a means for automating setup of virtual build and test environments, especially for my Samba/CTDB development, since in particular setup of clustered Samba servers is somewhat involved, and being able to easily produce a pristine new test and development environment is highly desirable.

It took some time for me to get it right, especially because I did not choose the standard virtualbox hypervisor but wanted to stick to my environment that uses lxc for Linux and libvirt/kvm for everything else, but also to some extent because I am now using Fedora as a host and also for many Linux boxes, and I had to learn that vagrant and lxc don’t seem to play best with Fedora. Since others might profit from it as well, I thought I’d publish the results and write about them. This post is the first in a series of articles leading up an environment where vagrant up on a fedora host provisions and starts, e.g., a 3(or 4 or …)-node Samba-CTDB cluster in LXC. This first post describes the steps necessary to run vagrant with libvirt and lxc backends on Fedora 21.

Continue reading

taming the thinkpad’s terrible touchpad

After many years of working with X-series thinkpads, I have come to love these devices. Great keyboard, powerful while very portable and durable and so on. But I am especially an addict of the trackpoint. It allows me to use the mouse from time to time without having to move my fingers away from the typing position. The x230 was the first model I used that additionally features a touchpad. Well, I hate these touchpads! I keep moving the mouse pointer with the balls of my thumbs while typing, which is particularly irritating since I have my system configured to “focus-follows-mouse”. Now with the x230 that was not a big problem, because the I could simply disable the touchpad in the BIOS and keep using the trackpoint and the three mouse buttons that are positioned between keyboard and touchpad. So far so good.

Since three weeks now, since my start at Red Hat, I am using an x240. It is again really nicely done. Great display, very powerful, awesome battery life, … But Lenovo has imho committed an unspeakable sin with the change to the touchpad: The sparate mouse buttons are gone, and instead there are soft keys integrated into regions of the touchpad. Not only are the buttons much harder to hit, since the areas are much harder to feel with the fingertips than the comparatively thick buttons of the earlier models, but the really insane consequence for me is that I can’t disable the touchpad in the BIOS, since that also disables the buttons! This rendered the laptop almost unusable unless docked, with external mouse and keyboard. It was a real pain. :-(

But two days ago GLADIAC THE SAVIOR gave the the decisive hint: Set the TouchpadOff option of synaptics to value 1. Synaptics is, as I learned, the Xorg X11 touchpad driver. And this option disables the touchpad except for the button functionality. Exactly what I need. With a little bit of research I found out that my brand new Fedora 21 supports this out of the box. Because I am still finding my way around fedora, I only needed to find the proper place to add the option. As it turns out,


is the appropriate file, and I added the option to the section of “Lenovo TrackPoint top software buttons”.
Here is the complete patch that saved me:

--- /usr/share/X11/xorg.conf.d/50-synaptics.conf.ORIG 2014-12-18 22:53:18.454197721 +0100
+++ /usr/share/X11/xorg.conf.d/50-synaptics.conf 2014-12-19 09:03:44.143825508 +0100
@@ -57,13 +57,14 @@

 # Some devices have the buttons on the top of the touchpad. For those, set
 # the secondary button area to exactly that.
 # Affected: All Haswell Lenovos and *431* models
 # Note the touchpad_softbutton_top tag is a temporary solution, we're working
 # on a more permanent solution upstream (likely adding INPUT_PROP_TOPBUTTONPAD)
 Section "InputClass"
         Identifier "Lenovo TrackPoint top software buttons"
         MatchDriver "synaptics"
         MatchTag "touchpad_softbutton_top"
         Option "HasSecondarySoftButtons" "on"
+        Option "TouchpadOff" "1"

Now I can enjoy working with the undocked thinkpad again!

Thanks gladiac! :-)

And thanks of course to the developers of the synaptic driver…

tmux with screen-like key-bindings

I recently starting switching from screen to tmux for my daily workflow, partly triggered by the increasing use of tmate for pair-programming sessions.

For that purpose I wanted the key-bindings to be as similar as possible to the ones I am used to from screen, which mostly involving the prefix (hotkey) from Ctrl-b to Ctrl-a. This is achieved in the awesome tmux configuration file ~/.tmux.conf by

set-option -g prefix C-a

Now in screen, you can send the hotkey through to the application by typing Ctrl-a followed by a plain a. I use this frequently, e.g. for sending Ctrl-a to the shell prompt instead of pos1. Tmux offers the send-prefix command specifically for this purpose, which can be bound do a key. My ~/.tmux.conf file already contained

bind-key a send-prefix

According to the tmux manual page, this complete snippet should make it work:

set-option -g prefix C-a
unbind-key C-b
bind-key C-a send-prefix

but it was not working for me! :-(

Continue reading

A nice little chat on IRC

Day changed to 30 Okt 2014
(13:09) <metze> 217b4b60fd602bad569e7e06adabe308e23c5807
(13:22) <obnox> 105724073300af03eb0835b3c93d9b2e2bfacb07
(13:22) <obnox> rw = brl_get_locks_internal(talloc_tos(), fsp, false);
(13:28) <obnox> 5d8f64c47d02c2aa58f3f0c87903bbd41d086aa0
(13:30) <metze> 77d2c5af511d60b3437b9cfa2113283ed2aa6194
(13:33) <obnox> 29bf737
(13:34) <obnox> d0290a9
(13:34) <obnox> 4e9b4a5
(13:34) <obnox> 7a6cf35
(13:53) <metze> dd33241d29122721edd35e2d53992939ef556c1a
(13:57) <obnox> 5633861c4b6f22b09a9fa0bf91fdeb43b4f3558b


Powershell Cheat Sheet

Here are a few Powershell commands I used for testing and analysis of SMB3 Multi-Channel:

Get-SmbMultiChannelConnection [-IncludeNotSelected ]

Especially the “-IncludeNotSelected” to Get-SmbMultiChannelConnection is
useful when debugging connection problems with Multi-Channel setups.

Interestingly, by appending a filter pipe to these commands, one can
produce more output, e.g.:

Get-SmbMultiChannelConnection | fl * | more

(fl is synonymous Filter-List)
This seems slightly strange at first but is actually quite handy.

Demo of SMB3 multi-channel with Samba

Version 3 of the SMB protocol was introduced by by Microsoft with Windows Server 2012. One of the compelling features is called “multi-channel” and gives the client the possiblitly to bind multiple transport connections to a single SMB session, essentially implementing client-controlled link aggregation at the level of the SMB protocol. The purpose of this is (at least) twofold: Increasing throughput, since the client can spread I/O load across multiple physical network links, and fault-tolerance, because the SMB session will be functional as long as one channel is still functional.

A Samba-implementation of multi-channel is still work in progress, but already rather advanced.

Here is a screencast demo of how that already works with latest WIP code:

Continue reading

git: rebasing all commits of a branch

I have been searching for this feature a bit, so I note it down here for easier retreival…

Interactive rebasing (git rebase -i) is one of the most awesome things about git. Usually my call pattern is git rebase -i COMMIT1. This will present all commits of the current branch after COMMIT1 in the rebase editor. I.e. with this syntax, you always need the parent commit of the first commit you want to see in rebase. But sometimes one needs to interactively rebase all commits, e.g. when preparing a new branch before publishing it.

After playing with inserting a “x false” as the topmost line in the rebase editor, which works, I now found that git (of course :-) ) has a syntax for this:

Continue reading

Running Debian Squeeze as libvirt/kvm Guest on Ubuntu

I struggeled for a while with Debian Squeeze, trying to persuade it to run as a libvirt/kvm guest on my Ubuntu 12.04 host. After successful installation, the guests failed to boot the kernel with the messages:

Loading Linux 2.6.32-5-amd ...
unaligned pointer 0x8ebf0002
Aborted. Press any key to exit.

For my own reference, I record here the solution I just found after trying all sorts of things like installing different versions of grub into the virtual machine:

Continue reading

Samba Team Visits Microsoft For SMB2.2 Interop Event

In the week of February 27 to March 2, 2012, a few Samba developers accepted an invitation by Microsoft and attended an SMB2.2 testing opportunity at Microsofts Enterprise Engineering Center in Redmond. Jeremy Allison, Steve French, Volker Lendecke, Chris Hertel, Christian Ambach, Matthieu Patou and I found our way to Redmond with Stefan Metzmacher participating to some extent via IRC and mumble. For me, the event was a big success, and I am happy that I finally made up my mind to go there.  This is my personal report.

Continue reading