Wednesday, July 18, 2012

Open vSwitch active-passive failover - unreachable guests

The current release of Open vSwitch (1.6.1) does not send learning packets when doing an active-passive bond failover. Switches connected to your network interfaces will not now about the network change when LACP is not used. Result: all your virtual machines machines become unavailable until your guests send out packages that updates the MAC learning table of the uplink switches or until the entry expires from the learning table.

The next release (1.7?) will include a patch to send learning packets when a failover happens. I tested the patch by doing a manual failover on the host and having the interfaces connected to 2 different switches:

# ovs-appctl bond/show bond0
# ovs-appctl bond/set-active-slave bond0 eth1

Hooray! Not a single interruption in guest connectivity... like it should be :-)

SUSE KVM guest 100% cpu usage - lost network - wrong date

There is something wrong with the "kvm-clock" paravirtual clocksource for KVM guests when running the 2.6.32.12-0.7-default kernel of SLES 11 SP1.

Several times now, I encountered unreachable virtual machines (lost network), 100% cpu usage of these guests as seen from the host, and when logging in to the guest console for further debugging:

  • wrong date, like Sun Feb   5 08:08:16 CET 2597
  • in dmesg: CE: lapis increasing min_delta_ns to 18150080681095805944 nsec

The fix is simple, update to the latest kernel in SLES 11 SP1, like 2.6.32.54-0.3.1 which apparently provides a stable kvm-clock module.

As as side note: I'm using ntpd on the guests.  Some resources report that you should, other tell the opposite.  My experience is that when doing live migrations, clock drifting may appear which is not corrected or too slowly.  Ntpd handles this correctly.

Tuesday, July 17, 2012

KVM Live migration of memory intensive guests

Recently, I've had some trouble to live migrate a memory intensive (jboss) application on a KVM virtual machine. It took ages (read it failed after 1,5h) for the online migration of the VM to another KVM host while a jvm with 4GB heap size (1GB young gen.) was constantly refilling the memory.

I got around this by increasing the migrate-setmaxdowntime value on the host while the domain was migrating away:

# virsh migrate-setmaxdowntime <domain name> 750

This allows the domain to be paused for 750ms while the remaining memory is sync'ed to the new host. Smaller values can be tried first, and changed on the run...

This behavior can also be simulated by using the "stress" utility on the guest:

# stress --cpu 1 --vm 8 --vm-bytes 128M --vm-hang 1 --timeout 900s

If it takes too long, increase the maxdowntime parameter (or increase your network bandwidth). It can also be worthy to check if the migration process is really taking advantage of all the available bandwidth with a utility like "iftop". If needed, increase to the available bandwidth:

# virsh migrate-setspeed <domain name> 1000

After all, sometimes it's more acceptable to have a small hickup than failing all the way and having to do an offline migration. As long as your application can live with it...

Sunday, April 02, 2006

Integrating MSN with Google Talk

Since Google made their Google Talk servers able to talk with other Jabber servers, this finally opened some possibilities to make use of the service. Google Talk is a nice IM application, using a nice open standards protocol (Jabber), but without users, there is little point in using it... Making it possible to add Jabber users to your GTalk account was a big step forward.

The ideal situation would be that Google Talk could simply integrate with the already existing IM networks like MSN, AIM, etc. Too bad, this isn't possible yet, but there is a work-around! Many Jabber servers also provide an MSN transport, which makes it possible to add your existing MSN contacts to your Jabber account. For this to work, you have to register to the MSN transport with your MSN account, and it automatically will import your MSN buddies to your Jabber account.

Now, the nice thing is that this also works with GTalk. Although Google doesn't provide such an MSN (or replace with any other IM network) transport, you still can use 3rd party MSN transports with your GTalk account. It may not be that straight-forward to set up, but it works (I've been using it for several months now like this), and one of the other nice things is that all converstations are automatically logged in GMail (if you enabled this). Since your MSN transports are imported, they also start to appear in you GMail "Quick contacts" list with their MSN status (like they do in your GTalk application).

So how to set it up now? This has already been covered by other people, so I won't repeat and simple point to Jeff's post at BigBlueBall...

Sunday, November 06, 2005

Psi cvs (0.10) for SUSE 10.0

Since the release of SUSE 10.0 and from what I had seen from Brainshare 2005, I was curious enough to install it on my laptop. I didn't leave Kubuntu, as I'm still using Breezy on my desktop. I don't know what to think about Novell's decision to go for Gnome as the default window manager for their enterprise products, especially since I'm using KDE for years now, and I like its degree of customization. One thing is for sure, it's easier and cheaper to maintain only one environment, especially if you have to support all choices. But I hope KDE will still get enough attention in coming OpenSUSE releases. Let's wait and see what the future brings :-)

Anyway, back to the topic! ;-) I love to use Psi as an IM-client for my Jabber and MSN contacts (and now also Google Talk contacts). I tried GAIM before, but what irritated me was the lack of seeing your own status (maybe that fixed by now) and Kopete, but I prefer the simple and powerful look and feel of Psi. You can download version 0.9.3 from Guru's website, but Psi 0.10 (which is currently still in development) has a few interesting features like:
  • auto-resize roster
  • tabbed chat windows
  • auto-resize text input
Especially the first 2 are my favorites!

For those of you running (Open)SUSE 10.0, you can download my Psi cvs RPM based on cvs date 2005-11-05.

Psi 0.10 will probably be released soon now, if no critical bugs show up in their test3 release, but this cvs version seemed already very stable.

Sunday, September 25, 2005

Kubuntu upgrade from Hoary to Breezy


With the upcoming release of Breezy and the availability of RC1, I thought it was time for doing an upgrade. I modified my sources.list, changed every instance of "hoary" to "breezy", followed by an "apt-get update && apt-get dist-upgrade"... and there we go!

In the progress of downloading and installing, I realized again how powerful APT really is... I was upgrading my system to a whole new release version, while I continued listening to my music, browsing the web, hanging around on IRC, etc. After a while, I noticed Konqueror couldn't surf the web anymore, due to a communication problem with kio_http, but what would you expect?

The upgrade went smooth, except for some dependency problem with mozilla-firefox and the firefox package, but that was easily fixed by uninstalling one, and install the other... Then it was time for a reboot, so I could run the newest kernel... Ow, I also added kubuntu-default-settings and kubuntu-desktop to the install list, to make sure I had all newest stuff installed, like usplash.

Booting went fine, except that usplash didn't seem to work... I also had troubles getting my network up. My desktop connected wireless to my router, and there seemed a problem with my ndiswrapper config (I'm using a Linksys USB dongle). Ok, maybe I was looking for trouble with this setup ;-)

To solve the networking problem, I first tried to update the ndiswrapper kernel module (although it's there by default, but I thought it was causing the troubles). Therefore I first had to download the package on another machine of course. After compilation, it seemed my fresh kernel module was compiled with GCC 4.0, while the kernel was compiled with GCC 3.4... ok, I changed my /usr/bin/gcc link to point to the right gcc version, and tried again... No luck! Dmesg output told me it loaded the ndiswrapper driver, but it didn't seem to detect the hardware (although ndiswrapper -l showed the driver was installed and the hardware was present), but the kernel didn't give me the required wlan0 interface! In the end, I removed the Windows driver using "ndiswrapper -e rt2500usb" and I reinstalled it with "ndiswrapper -i /path/to/rt2500usb.inf". This time, things started to work! :-))

I don't know what the problem was, and why I had to reinstall the Windows driver, because it was already installed in /etc/ndiswrapper/... but it fixed my problem. I'm sure if I had use proper hardware which has native Linux drivers, I wouldn't have had this problem, but oh well, I'm glad if I can learn something new.

Running Breezy for half a day now... it seems pretty stable. I also upgraded to KDE 3.5 beta (yeah, I love living on the edge), which seems pretty stable too! Actually, I didn't have a single crash yet... The only "problem" I have, is that my "Terminal Sessions" menu item disappeared from the K-menu for some reason, while it's still checked in the panel properties. Disabling and re-enabling didn't fix the problem, so maybe I should report this as a bug. Last night I also had some trouble with loosing my network connectivity, but this problem seems to have vanished...

Meanwhile, I'm also downloading OpenSUSE 10.0, since I may give it a try on my laptop... I'll see...

Brainshare 2005

Finally some time post an update here! It's almost a week now since my visit to Novell Brainshare 2005 in Barcelona for work related business. Well, it's acutally a bit longer, but I stayed a few days extra to enjoy the local goodies, and Barcelona plain rocks! At Brainshare I was for most interested in the Linux technical tracks. I saw some really promissing live demo's from the Novell people about stuff they are working on for SLES10 and Novell Linux Desktop (NLD) 10.

Some Linux highlights:
  • Beagle, the new desktop search tool for NLD and SUSE, which performed very well and can scan PDF, mail, Word/Openoffice documents, etc almost realtime!
  • Xen 3, which would be part of SLES10. I saw a live demo of a virtual machine migration (video streaming server was running in it) from one system to another, while a client was streaming a video. The migration took about 20 seconds, but the best part was that the actual switch only resulted in a 1-2 second delay in the video, after which it continued to play!
  • Clustering capabilities: the new heartbeat 2.x branch wouldn't be restricted to only 2 nodes. Tests have been done up to 16 nodes. Together with DRBD (Distributed Replicated Block Device), one could set up clusters without the need for special hardware (SAN), apart for an UPS or a power switch. Another important improvement is the availability for resource monitoring, which lacks today in heartbeath 1.x
  • Novell Small Business Suite for Linux also looks promissing with the 7.x release, which will be a lot more complete than the current 6.5 release for Linux.
Although I'm a happy Kubuntu user, maybe I'll give OpenSUSE a try after what I've seen...