kubuntu kde4 missing fam support for nfs (kdelibs-bin)

Bug #525005 reported by Dean Montgomery
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
kde4libs (Ubuntu)
Expired
Undecided
Unassigned
Declined for Natty by Felix Geyer

Bug Description

When I update a file on the nfs-server the nfs-kubuntu-client does not see the change. This effects diskless-nfs-workstation's centralized software updates and nfs mounted $HOME.

Kubuntu's kde4.x appears to be missing FAM (gamin) support for NFS / (root) or NFS /home.
i.e. kdelibs-bin is built without libfam-dev/libgamin-dev as noted in /usr/share/doc/kdelibs-bin/changelog.Debian.gz

Backgroud:
Running 3200 diskless clients (kde3.5) - changing files on the server are reflected on the clients via gamin/fam. I've just started beta-testing Kubuntu's kde4 on the diskless workstations. I've run into the problem of not being able to update software on the server due to the diskless nfs clients not being able to "see" changes made on the server (e.g. /usr/share/applications/NEW_APP.desktop).

Here is more detailed thread on kde forum - it was suggested I ask Kubuntu about libfam support.
http://forum.kde.org/viewtopic.php?f=63&t=85866

affects: ubuntu → kdelibs (Ubuntu)
affects: kdelibs (Ubuntu) → kde4libs (Ubuntu)
Revision history for this message
Bastian Holst (bastianholst) wrote :

Is there any reason why kde4libs is built without libfam-dev/libgamin-dev?

I think this is pretty important for professional Kubuntu installations.

Revision history for this message
Rohan Garg (rohangarg) wrote :

Hi
This is because libfam-dev is in Universe and kde4libs is in main.Main components can only be built against main packages.In order to get kde4libs to build with libfam-dev, libfam-dev will need to go a MIR.Please see : https://wiki.ubuntu.com/MainInclusionProcess

Revision history for this message
Felix Geyer (debfx) wrote :

libgamin-dev is in main so we should be able to use that library.

Revision history for this message
Felix Geyer (debfx) wrote :

If you are interested I could put a FAM-enabled kde4libs into a PPA.

Felix Geyer (debfx)
Changed in kde4libs (Ubuntu):
status: New → Fix Committed
Revision history for this message
Felix Geyer (debfx) wrote :

On second though, are you sure FAM support is really needed?
Doesn't inotify cover this?

Changed in kde4libs (Ubuntu):
status: Fix Committed → Incomplete
Revision history for this message
Dean Montgomery (dmonty) wrote :

It seems inotify doesn't work too well over nfs as the nfs server has a separate kernel from the nfs client. The client kernel does not see changes on the server's file system. So we are back to FAM.

Revision history for this message
Harald Sitter (apachelogger) wrote :

KDirWatch *always* starts the FAM server, regardless of whether NFS is watched, additionally you have the extra library loaded.
All of which is of no use for just about everything except NFS.

So, IMHO the question is what does FAM do that the NFS kernel module could not do to then fake inode changes for inotify to report to KDirWatch.

Ultimately I believe the proper solution to be that NFS gets fixed so that it works with inotify.

Revision history for this message
Dean Montgomery (dmonty) wrote :

So Sitter is suggesting that FAM is removed because it is only useful for NFS diskless systems and adds bloat to regular systems. NFS diskless systems is a huge time-saver for rolling out Linux in schools as you can centrally manage the OS and documents for close to 200 workstations and thousands of users on a single server/file system. Even shared NFS drop-box folders break when FAM isn't working.

I couldn't find a mailing list or bug-reporting system on the inotify website. Google search indicates that inotifiy does not have proper nfs support.

FAM however is known to work with NFS - we have FAM working on Debian kde 3.5 as it is built with FAM support. However *buntu kde 4 does not have FAM support so it isn't working well with diskless. We would like to migrate from Debian to *butnu desktop as the software is up-to-date and a bit more end-user-friendly.

Revision history for this message
Harald Sitter (apachelogger) wrote :

http://en.wikipedia.org/wiki/List_of_file_systems#Distributed_file_systems
There are plenty of other distributed file systems.

I am not suggesting anything about its removal, as I do not know why it was removed and quite frankly I do not find it important. I am arguing that re-adding FAM support is something that ought to be considered well.

You apparently misunderstood "Ultimately I believe the proper solution to be that NFS gets fixed so that it works with inotify." as that the error is with inotify, which is not the case.

Inotify as the name sort of suggests works on basis of inodes, which is essentially a "thing" on your file system, so every folder is an inode and every file is an inode etc.
What inotify essentially does is watch inodes (as specified by the application, i.e. Dolphin would set a watch on $HOME if it is currently displaying that) and then emit events when the inode changes, thus allowing the application to e.g. refresh the view.

Which now brings us to the requirement for working inotify: the filesystem needs to emit changes to the inode.
Something that NFS supposedly does not do. Hence the question, what does FAM do that perhaps NFS could do too to emit changes so that inotify starts working.

So here are the options
a) fix NFS (which would of course be best choice as obviously enough it *should* be working with inotify whereas using FAM would be a workaround)
b) find a way to build with gamin while not having the daemon as hard dependency thus eliminating the sore spot of daemon launch at startup (libgamin seems to be 116kib so that might be barable in RAM, if still useless in 99% of setups)

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for kde4libs (Ubuntu) because there has been no activity for 60 days.]

Changed in kde4libs (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Dean Montgomery (dmonty) wrote :

I found this fixed the issue for Kubuntu 12.04 by adding the gamin dev files before compiling libkdecore5:

[code]
sudo apt-get build-dep libkdecore5
sudo apt-get install build-essential fakeroot devscripts libaspell-dev libgamin-dev gamin libgamin0
mkdir kde4
cd kde4
apt-get source libkdecore5
cd kde4libs-4.*/
time debuild -us -uc -i -I -j4
 # -j4 is for my multicore machine.
 # compile took 1 hour on my machine.
sudo dpkg -i ../libkdecore5*.deb
[/code]

Rinse and repeat after each upgrade to libkdecore5*.

This may also have to be done for libgnomevfs2-0 package for gnome apps.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.