New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem resolving NFS4 symlinks during "Update library" operations #23327
Comments
The KODI code uses nfs_stat64 to stat files/directories. This method is expected to act the same way with links as opening the file. So Kodi does the right call to the nfs library. With the option "no_subtree_check" in your export, you indicate to your nfs server to accept that not all links in the chain has to be exported. It seems that this option is efficient while opening but not while stating the same chain. So it seems that the issue is more on the nfs server side than in Kodi. |
Thanks for getting back to me. I just tried removing "no_subtree_check" from the exports, but it didn't help. Nevertheless, I think your analysis of it being on the NFS server side is right. Since I don't have a clean way to demonstrate the problem to NFS /kernel supporters, I think I'll go back to the workaround I used under NFS3 (separate Kodi-friendly directory hierarchies for each of DWMedia7 and DWMedia9). If you'd like me to try anything else, though, let me know. |
Exporting the folder "/DWMedia" in a read-only mode for kodi host/ip (rw is not required in your case), should solve the problem in V4. |
Could you test if removing this part fixes the issue for you? xbmc/xbmc/filesystem/NFSDirectory.cpp Lines 254 to 264 in e007eb0
|
Sorry, I haven't been keeping up with this issue...
|
Bug report
Describe the bug
Here is a clear and concise description of what the problem is:
Kodi does not create a new entry in the video library for a symlink that points to another symlink that is outside the scope
of a video source's NFS4 namespace, even if that second symlink points back into the NFS4 namespace (a situation that the NFS4 server handles). This is true, even though the video can be played by browsing Kodi's source for the video. This happens on both Linux and Android TV.
Here's some background...
My NFS4 server (rpi4a) is mounted on the Kodi client system (rpi4c) as /mnt/DWNfs:
DWMedia7, DWMedia9, and DWMyth are physical devices that are exported on the server as follows:
On the client machine, Kodi is configured to use NFS4, and the sources for Movies and TV shows are /mnt/DWNfs/mnt/DWMyth/VideosMetadata/Movies and /mnt/DWNfs/mnt/DWMyth/VideosMetadata/TV. To save storage space the video files (as opposed to the .nfo, etc. files) are symlinks to the "real" video files stored on DWMedia7 and DWMedia9. For example, the movie "2 Lava 2 Lantula" is on the client machine as:
/DWMedia/Videos/DVD5/2_Lava_2_Lantula/2_Lava_2_Lantula.mpg is not part of the NFS4 namespace, of course, however on the server:
which is in the NFS4 namespace. In fact realpath also finds the "real" video file on the client machine:
The upshot of all this is that the video is not added to the library, but Kodi can play the video by browsing the video source.
Expected Behavior
Here is a clear and concise description of what was expected to happen:
Updating the library should add these videos to the library.
Actual Behavior
The videos are not added to the library, and the following is displayed in the debug log.
Possible Fix
From the debug log, it appears that Kodi is tracing each step in the sequence of symlinks itself. Using realpath or some other mechanism that is supported by NFS4 to locate the "real" file at the end of the sequence should resolve the problem.
To Reproduce
Steps to reproduce the behavior:
Debuglog
The debuglog can be found here:
Part 1: https://paste.kodi.tv/wazapujuga.kodi
Part 2: https://paste.kodi.tv/noqaciqaya.kodi
Part 3: https://paste.kodi.tv/ayelubuzud
Part 4: https://paste.kodi.tv/xibicalofi.kodi
Screenshots
Here are some links or screenshots to help explain the problem:
Additional context or screenshots (if appropriate)
Here is some additional context or explanation that might help:
Your Environment
Used Operating system:
Android
iOS
tvOS
Linux
macOS
Windows
Windows UWP
Operating system version/name: openSUSE Tumbleweed 20230509
Kodi version: 20.1 (20.1.0)
note: Once the issue is made we require you to update it with new information or Kodi versions should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.
The text was updated successfully, but these errors were encountered: