Wednesday, December 22, 2010

Changing the clock source for Xen HVM domU's

On the last weeks I had noticed a problem with my xen guests that I had not been able to fix until today. The problem was that the time on them was jumping forward !! and in a couple of hours after setting the correct date, the time would be around 45 minutes ahead, even with ntpd running. This obviously created a lot of problems with our applications and servers, for example with subversion, developers could not see the latest changes to projects and Hudson was checking out and building an outdated project version, also having inaccurate info on the servers logs, etc.
The culprit of this was the default clock source Xen uses for HVM domU's (at least with the default version that comes with CentOS 5.5 which is 3.1.2), and I was told on xen-users mailing list that it was highly inaccurate and I should change it. Googling around I found how to do it and it was very simple, just add the following kernel boot params to your domU's to disable the time-stamp counter:
notsc divider=10
Then reboot them, login and adjust the date with the following command:
ntpdate -u 0.centos.pool.ntp.org
You can change the ntp server if you want. Also ensure that the ntpd service is running by issuing the following command:
service ntpd status
If it isn't then start it with:
service ntpd start
And make sure it starts at boot time:
chkconfig ntpd on
Now I have to repeat that on 18 servers :S fortunately there are tools to automate this kind of tasks like puppet or cfengine, which I'm currently looking into to setup in our company.
=-=-=-=-=
Powered by Blogilo

Wednesday, December 15, 2010

KDE 4.5.4 available for Mandriva 2010 Spring !!

I missed this one, but mikala has done KDE 4.5.4 packages for Mandriva 2010 Spring, thank you !! this time it includes some other goodies like Qt 4.7.1, Phonon 4.4.3, NetworkManager partial support and kdepim 4.4.8. Packages are available in Mandriva Italia Backports (MIB) FTP for both i586 and x86_64 platforms. Here are the upgrade instructions:

First, if you have added the repositories for any previous version, remove them with the following command:

urpmi.removemedia kde-4.5.3

or whatever name you gave to the repository. Second, add the KDE 4.5.4 repository. For 32 bit systems use the following urpmi command (as root):

urpmi.addmedia --update MIB-KDE454_release http://mib.pianetalinux.org/MIB/2010.1/others/kde/4.5.4/32/release
urpmi.addmedia --update MIB-KDE454_updates http://mib.pianetalinux.org/MIB/2010.1/others/kde/4.5.4/32/updates
urpmi.addmedia --update MIB-KDE454_extras http://mib.pianetalinux.org/MIB/2010.1/others/kde/45X-extras/32/


For 64 bits systems use the following urpmi command (as root):

urpmi.addmedia --update MIB-KDE454_release http://mib.pianetalinux.org/MIB/2010.1/others/kde/4.5.4/64/release
urpmi.addmedia --update MIB-KDE454_updates http://mib.pianetalinux.org/MIB/2010.1/others/kde/4.5.4/64/updates
urpmi.addmedia --update MIB-KDE454_extras http://mib.pianetalinux.org/MIB/2010.1/others/kde/45X-extras/64/


Then update the repositories and download all the packages before actually installing them to make sure that the installation is possible (as root):

urpmi --auto-update --auto-select --test

When all packages finish downloading and you see a message at the end saying that the installation is possible, you can now run the same command without the --test parameter to now perform the installation (as root):

urpmi --auto-update --auto-select

After the packages installation finishes, logout and log back in, That's it. If you have any problem with the upgrade, the first thing to do to try to solve it is to log out, move away your .kde4 directory and log back in.