After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 417880 - libbeagle does not find beagle directory for nfs mounted home dir
libbeagle does not find beagle directory for nfs mounted home dir
Status: RESOLVED FIXED
Product: beagle
Classification: Other
Component: General
0.2.16
Other All
: Normal normal
: ---
Assigned To: Beagle Bugs
Beagle Bugs
Depends on:
Blocks:
 
 
Reported: 2007-03-13 14:38 UTC by Martin Buerger
Modified: 2007-08-30 11:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
correct determination of beagle storage directory (2.05 KB, patch)
2007-03-27 23:09 UTC, Debajyoti Bera
none Details | Review
stupid mistake in previous patch, fix that (2.05 KB, patch)
2007-03-28 15:19 UTC, Debajyoti Bera
accepted-commit_now Details | Review

Description Martin Buerger 2007-03-13 14:38:36 UTC
Please describe the problem:
Hello,
I want to refer to a bugreport at KDE. Nothing has changed the situation mentioned [1] yet.


[1] http://bugs.kde.org/show_bug.cgi?id=142637

Steps to reproduce:
1. Install Kerry (http://en.opensuse.org/Kerry)
2. Move .beagle directory to some other place and create a symbolic link to it - pointing from ~ to the new location
3. Start Kerry and start the beagle daemon. Kerry won't be able to recognize any running beagle daemon.


Actual results:
Kerry is not able to search the beagle database since it is not able to detect the running beagle daemon.

Expected results:
Kerry should be able to work with the symlinked .beagle directory, detect the running beagle daemon and return search results.

Does this happen every time?
Yes.

Other information:
Comment 1 Joe Shaw 2007-03-13 17:09:20 UTC
I believe this is already fixed in SVN?
Comment 2 Debajyoti Bera 2007-03-14 17:53:52 UTC
Dont know. I fixed the BEAGLE_STORAGE for libbeagle in svn months ago but I dont know the status of symlinked .beagle directory.
Comment 3 Debajyoti Bera 2007-03-16 00:55:30 UTC
I tested with a symlinked .beagle directory and svn. Its working.
Comment 4 Martin Buerger 2007-03-27 09:04:59 UTC
Well it's working, but not for Kerry. This means libbeagle might still be broken. I've just installed libbeagle from svn which did not solve this problem.

Maybe still a problem with beagle_util_daemon_is_running().
Comment 5 Debajyoti Bera 2007-03-27 12:24:42 UTC
I checked with the libbeagle example program in libbeagle/examples/*.c
I will check again in a few days, but you are using the svn trunk (and not the bugfix branch) - right ?
Comment 6 Martin Buerger 2007-03-27 12:37:16 UTC
(In reply to comment #5)
> I checked with the libbeagle example program in libbeagle/examples/*.c
> I will check again in a few days, but you are using the svn trunk (and not the
> bugfix branch) - right ?
I used this to checkout:
svn checkout http://svn.gnome.org/svn/beagle/trunk/libbeagle

Comment 7 Debajyoti Bera 2007-03-27 16:25:00 UTC
I am unable to reproduce it.

[debajyoti@dbera ~]$ stat .beagle
  File: `.beagle' -> `.foo'
  Size: 4               Blocks: 0          IO Block: 4096   symbolic link
Device: 1609h/5641d     Inode: 29442888    Links: 1
Access: (0777/lrwxrwxrwx)  Uid: (  502/debajyoti)   Gid: (  502/debajyoti)

and then kerry works! (BEAGLE_HOME and BEAGLE_STORAGE is not set).

[debajyoti@dbera src]$ ./kerry
ScimInputContextPlugin()
~ScimInputContextPlugin()
ScimInputContextPlugin()
[debajyoti@dbera src]$ kerry: Creating client with id:661209457
kerry: searchProgramList
kerry: searchBookmars
kerry: searchAddressBook
kerry: starting BeagleSearch
kerry: ---------- finished
kerry: Finished query ...

Do you have your home directory on nfs or smb ?
Comment 8 Martin Buerger 2007-03-27 18:47:41 UTC
(In reply to comment #7)
> I am unable to reproduce it.
> 
> [debajyoti@dbera ~]$ stat .beagle
>   File: `.beagle' -> `.foo'
>   Size: 4               Blocks: 0          IO Block: 4096   symbolic link
> Device: 1609h/5641d     Inode: 29442888    Links: 1
> Access: (0777/lrwxrwxrwx)  Uid: (  502/debajyoti)   Gid: (  502/debajyoti)
> 
> and then kerry works! (BEAGLE_HOME and BEAGLE_STORAGE is not set).
> 
> [debajyoti@dbera src]$ ./kerry
> ScimInputContextPlugin()
> ~ScimInputContextPlugin()
> ScimInputContextPlugin()
> [debajyoti@dbera src]$ kerry: Creating client with id:661209457
> kerry: searchProgramList
> kerry: searchBookmars
> kerry: searchAddressBook
> kerry: starting BeagleSearch
> kerry: ---------- finished
> kerry: Finished query ...
> 
> Do you have your home directory on nfs or smb ?
Yes, my home directory is on nfs.

mount returns for my home:
data:/home/work on /home/work type nfs (rw,nosuid,nodev,hard,intr,rsize=8192,wsize=8192,rsize=8192,wsize=8192,addr=xxx.xxx.xxx.xxx)

Comment 9 Debajyoti Bera 2007-03-27 21:41:22 UTC
> > Do you have your home directory on nfs or smb ?
> Yes, my home directory is on nfs.

Ah. Beagle behaves a bit differently when .beagle is on NFS mounted filesystem. I dont really know the exact steps that happen, roughly it is copied to a temporarary directory on a local filesystem and then the contents of .beagle are kept in sync. This is to ensure fast access to .beagle contents.

Joe, how does BeagleClient-C# get the correct location for .beagle for NFS filesystems ?
Comment 10 Debajyoti Bera 2007-03-27 23:09:13 UTC
Created attachment 85409 [details] [review]
correct determination of beagle storage directory

Can you apply the patch and see if it makes any difference ? Libbeagle was using a slightly different approach for nfs mounted .beagle, the patch would make it follow the same steps as our C# api.
Comment 11 Martin Buerger 2007-03-28 09:50:56 UTC
(In reply to comment #10)
> Created an attachment (id=85409) [edit]
> correct determination of beagle storage directory
> 
> Can you apply the patch and see if it makes any difference ? Libbeagle was
> using a slightly different approach for nfs mounted .beagle, the patch would
> make it follow the same steps as our C# api.
I applied the patch but unfortunately it does not solve my problem.

What I did after I had installed the patched libbeagle:
- removed .beagle in my home directory.
- started kerry and configured stuff -> ~.beagle was created
- moved the newly created ~.beagle to /local/.beagle
- created a symlink from ~.beagle to /local/.beagle
- from within kerry I started the beagle-daemon
- beagle-daemon is running but kerry does not recognise it
Comment 12 Debajyoti Bera 2007-03-28 15:19:26 UTC
Created attachment 85463 [details] [review]
stupid mistake in previous patch, fix that

Can you do it the other way round ? i.e.

- apply the patch
- removed .beagle in home directory
- started beagled (manually or from kerry)
- quit kerry
- move .beagle to somewhere else and create the symlink
- start kerry and beagled (from kerry or manually)
Comment 13 Martin Buerger 2007-03-29 10:39:22 UTC
(In reply to comment #12)
> Created an attachment (id=85463) [edit]
> stupid mistake in previous patch, fix that

This fixed it, thank you. But you might want to fix the patch: you changed it to beagle_storage instead of beagle_storage_dir.
Comment 14 Debajyoti Bera 2007-03-29 12:09:10 UTC
> This fixed it, thank you. But you might want to fix the patch: you changed it
> to beagle_storage instead of beagle_storage_dir.

Oho, must have forgotten to build before attaching patch. I presume you changed beagle_storage to beagle_storage_dir and everything (builds and) works fine.

I will commit the patch.
Comment 15 Debajyoti Bera 2007-03-29 20:13:17 UTC
Checked this is. r3609.
Comment 16 Martin Buerger 2007-08-30 08:56:13 UTC
Unfortunately the bug still exists in version 0.2.17 to which I upgraded recently. I fixed it by adding the patch (slightly modified) again. I checked the sources from version 0.2.18 and the lines look alike. I afraid this happens with 0.2.18 too.
Comment 17 Debajyoti Bera 2007-08-30 11:21:41 UTC
> Unfortunately the bug still exists in version 0.2.17 to which I upgraded
> recently. I fixed it by adding the patch (slightly modified) again. I checked
> the sources from version 0.2.18 and the lines look alike. I afraid this happens
> with 0.2.18 too.

Oops you are right ... the patch was not merged to 0.2.17/18. I merged (with 3890, 3860, 3861, 3863) 3609 in r3921 in the branch used to release 0.2.17/18. Its too late for 0.2.18. In case another 0.2.* release is made, it will have the problem fixed.