Articles

RPM the easy way ?

While Karanbir posted an interesting rpm the other day , that reminded me another commercial app I had to look once. The application was provided as an RPM, but it seems that none of the installed files was declared in the rpmdb .. and here is why :

[arrfab@waldorf vmware]\$ echo -e "Files present in the RPM package: \n" ; rpm -qlp VMware-Player-2.5.1-126130.x86_64.rpm ; echo -e "\nand now the RPM script : \n" ; rpm -qp --scripts VMware-Player-2.5.1-126130.x86_64.rpm
Files present in the RPM package:

/var/cache/vmware/VMware-Player-2.5.1-126130.x86_64.bundle

and now the RPM script :

preinstall program: /bin/sh
postinstall scriptlet (using /bin/sh):
# Execute bundle installer on install or upgrade after laying down bundle
# and then delete the bundle afterwards.
# Have to redirect the console to stdin because it's closed by default.
# Setting VMWARE_SKIP_RPM_UNINSTALL is necessary because we don't want the
# bundle to run rpm commands, since rpm will deadlock if that happens.
TERM=dumb VMWARE_SKIP_RPM_UNINSTALL=1 /var/cache/vmware/VMware-Player-2.5.1-126130.x86_64.bundle \
--required --console \< /dev/tty
rm -f /var/cache/vmware/VMware-Player-2.5.1-126130.x86_64.bundle
preuninstall scriptlet (using /bin/sh):
# On uninstall only, remove existing bundle installation.
if [ \$1 -eq 0 …

➟ Read more

Small thoughts about the upcoming RHEV

While I attended the Red Hat partner summit, we had a demo of the upcoming RHEV (for servers and desktops). It was strange that while Vmware announced a beta version of VirtualCenter running on Linux, on the their side, Red Hat decided to keep the version written in .Net (from people from Qumranet, acquired by Red Hat last year). So you need a Microsoft Windows 2003 machine to manage your Red Hat Virtualization infrastructure .. are times changing ?

Of course we know that Red Hat is an opensource company and that each time they acquired a company they opensourced properly the product (Directory Server, GFS, etc ...) so we're sure that the goal is to provide a Linux version in the future .. But due to the fact that all Virtualization companies are now in a race, Red Hat didn't want (again) to wait several months (even if RHEV ETA is september). Of course we can trust Red Hat on that one .. but on the other hand , Red Hat addicted people were astonished when we saw a Windows machine with Internet Explorer. Something nobody swore it would happen some years ago ...

➟ Read more

Citrix XenServer (still) using CentOS 5.x

While we were busy talking about the Virtualization market in #centos the other day , someone didn't know that Citrix was now offering their XenServer enterprise for free (as in beer, not speech). I guess that it's a kind of answer to the fact that Vmware offers ESXi also for free (since late july 2008). The console app is almost an exact copy of the screen you get with ESXi (but i don't know who copied the other though). I don't want to compare both products or features but because I was already busy with CentOS 5.3 QA tests I thought that it was a good time to download/test it .. Unfortunately their Xencenter management application is still a MS-only application that depends on .Net 2.0 (like VI client for Vmware, even if VMware announced recently a that a VI client for linux would probably be released and that they have now a demo of VirtualCenter Linux version running on CentOS ..)

And guess what Citrix is (still) using for the dom0 ? CentOS ! okay not a 'real' CentOS anymore because some packages (including the kernel of course but still based on 2.6.18-92.1.10.el5) were replaced but …

➟ Read more

Watching dd progress from one host to the other with pv

Recently i had to migrate a LVM based domU from machine 1 to machine 2 with only ssh port being available between the two hosts. Of course dd comes to the rescue for that but i admit that having some informations about transfer rate would be interesting. And then i remembered a Sébastien's blog post talking about about a nice tool called PV. Of course PV has nothing to do with PV as in Physical Volume for LVM but it's a 'pipe viewer' . A pv rpm is available in the RPMForge repo. Example (assuming that you've already created a domU2migrate lv on the target system) :

[root@machine2 \~]\# ssh machine1 "dd if=/dev/VolGroup00/domU2migrate"|pv -s 8G -petr|dd of=/dev/xen02vg/domU2migrate  
0:00:30 [11.2MB/s] [====\>4% ETA :10:13

I hope you'll find that useful if you never heard of such tool ..

➟ Read more

CentOS 5.3 QA tests at full steam

Thanks to the fact that Karanbir is now back in action, the QA team is now working on the 5.3 QA tree at full speed. There are some nice things in 5.3 (you can already look at the Upstream release notes). We've already discovered some missing deps and other new good things. Of course everything will be reported on the Wiki/in the CentOS 5.3 specific release notes.

One of the thing that astonished me is the fact that (even if not written in Upstream RN) some drivers seem to have been updated. For example the sky2 module didn't support the Marvel gigabit 88E8056 nic since 5.1 .. but .. :

[arrfab@waldorf \~]\$ modinfo /lib/modules/2.6.18-92.1.22.el5/kernel/drivers/net/sky2.ko |grep alias|wc -l
29
[arrfab@waldorf \~]\$ modinfo /lib/modules/2.6.18-128.el5/kernel/drivers/net/sky2.ko |grep alias|wc -l
30
Interesting , isn't it ? (especially for people having that kind of low-level entry nic in their workstation ..)

Other interesting stuff is the newer scsi-target-utils (aka tgtadm/iScsi target) that now includes a config file and two helpers to setup a new iscsi lun easily (tgt-setup-lun and tgt-admin) .. of course …

➟ Read more

CentOS @ Fosdem 2009 report

This Fosdem edition was, as usual, a good edition, including for the CentOS crew present on site. Of course some things could be better, like the fact that the WiFi network was unreliable (especially on saturday, but fixed after that) , that our booth was not in front of the devroom (like it was the case for the past events) . Some core CentOS members were missing, but for a very good reason though :D

We had some nice discussions with people coming at the booth and/or in the devroom. I personnaly had interesting conversations with Wouter Verhelst (about the eid middleware that we both package for our respective distributions ) and Simo Sorce (about the integration of (Free)IPA in the CentOS repositories) .. let's see how it goes in the future ..

Of course it was a pleasure to discuss with so much people , including people we're used to see each year, like Jeff 

For people interested , pictures are now online and presentations are (almost) all uploaded on the wiki.

See you next year and thanks to all the people from the Fosdem team who organized each year such an event !

➟ Read more

Maxtor external USB disk not Linux friendly ?

I recently decided to add an external disk to my small CentOS 5.2 xen dom0 home server (already using two 500Gb sata disk in lvm/mdadm raid1). I attached a Maxtor One-Touch IV 750Gb USB2 external disk to it and was able to directly re-partition the disk , format it in ext3 (not adding it in the lvm VG , i'm not 'so' fool). Great, i had now external device to store 'non vital data', aka local mirror of CentOS repositories and other stuff i can even grab from the Net if needed while the internal VG is used to store domU's and data shared through nfs on my lan. And then the problems :

"Jan 29 07:10:31 helium kernel: sd 6:0:0:0: Device not ready: \<6>: Current: sense key: Not Ready
Jan 29 07:10:31 helium kernel:     Add. Sense: Logical unit not ready, initializing command required
Jan 29 07:10:31 helium kernel:
Jan 29 07:10:31 helium kernel: end_request: I/O error, dev sdc, sector 12375
Jan 29 09:42:58 helium kernel: sd 6:0:0:0: Device not ready: \<6>: Current: sense key: Not Ready
Jan 29 09:42:58 helium kernel …

➟ Read more

Using 'compiled from source' software on CentOS ?

Right after Jim posted a link on his blog (appearing on http://planet.centos.org too) regarding software installed from source, we talked about that a little bit in #centos-social. In fact that's a common thing that we see with people entering #centos irc channel and looking for advice after they broke their CentOS installations. Don't get me wrong : I don't say that 'installing from source' will automatically 'break' your CentOS setup but usually people following such advice don't understand what they are doing, and so have to keep the pieces once that it's done ...

A lot of tutorials written "for CentOS" on the web in fact completely deviate from the CentOS philosophy. For example i've seen a lot of tutorials from Howtoforgeadvising to disable selinux and compile from source. More recently we found a new website securecentos.com explaining how to use a vanilla kernel patched with grsec, and installing everything else from source (or from third-party rpms provider like for the MySQL rpms) . Sorry, but I don't get the point ! Why use CentOS if 1) you don't care about the provided kernel 2) you don't benefit from all the security patches that Upstream backports to the provided …

➟ Read more

Finch IRC client running remotely and local notification event

As a lot of people i've always a irc client running in a screen session on one of my machines and i attach/detach that screen session from my laptop through ssh. I know that almost everybody in the same situation use irssi for that but due to professional reasons (at least until i got a new job ;-) ) i have to be able to reach also Lotus Sametime so finch (console part of the pidgin/purple project) was the only one to be able to reach both IRC and Sametime (through the meanwhile plugin).

But even when connected and attached to my screen session it's not possible to be notified if someone pings me. The idea was so to just parse the finch log files (by default in  \~/.purple/logs/irc/*) and use notify-send (part of the libnotify package)

Of course it's still needs some 'love' but it does what i want now :

ssh yourname@your.remote.server "tail -n 1 -q -f \~/.purple/logs/irc/youraccount\@irc.freenode.net/*/*.txt|grep -i --line-buffered yournickname"|while read line;do notify-send  -i /usr/share/pixmaps/IRC.png -u normal -t 20000 -- "IRC message" "\${line}";done
Now i've a nice pop-up when …

➟ Read more

Apache accessing nfs mounted dir with selinux enabled on CentOS 4.x

I had recently to modify/add some selinux policies on a CentOS 4.7 machine running in the DMZ network. The goal was to mount (through the Firewall between the DMZ and the production network) a exported NFS dir (from a CentOS 5.2 machine in the production lan) to a CentOS 4.7 machine. The second goal was to permit the httpd process on that CentOS 4.7 to browse and read file from that NFS dir.

The first goal was met by configuring properly the ports used on the NFS server (basically you can follow Jim's advice on that point but you can easily change port numbers of course) otherwise it's gonna be a nightmare to manage if you don't know in advance which ports need to be opened in your firewall ;-)

But the *Fun* really began when i tried to access that NFS dir from Apache/httpd : of course it doesn't work with selinux enabled .. Does that mean that you have to disable selinux on a machine sitting in the DMZ and exposed on the Wild internet through the httpd process ? No !

While several folks adviced that, don't do it .. On the other hand, it's true that …

➟ Read more