I'll try to concise my issue as much as possible.
Here's what I have:
What I'm trying to do:
So here's to the issue.
Mounting the folder onto the container works and files get generated including the failing .pid file which tells me rw
permissions are valid.
[v3.0.2.4552] System.UnauthorizedAccessException: Access to the path '/config/radarr.pid' is denied.
---> System.IO.IOException: Permission denied
--- End of inner exception stack trace ---
at System.IO.FileStream.WriteNative(ReadOnlySpan`1 source)
at System.IO.FileStream.FlushWriteBuffer()
at System.IO.FileStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at System.IO.StreamWriter.CloseStreamFromDispose(Boolean disposing)
at System.IO.StreamWriter.Dispose(Boolean disposing)
at System.IO.TextWriter.Dispose()
at System.IO.File.WriteAllText(String path, String contents)
at NzbDrone.Common.Processes.PidFileProvider.Write() in D:\a\1\s\src\NzbDrone.Common\Processes\PidFileProvider.cs:line 37
[Fatal] ConsoleApp: EPIC FAIL!
[v3.0.2.4552] NzbDrone.Common.Exceptions.RadarrStartupException: Radarr failed to start: Unable to write PID file /config/radarr.pid
---> System.UnauthorizedAccessException: Access to the path '/config/radarr.pid' is denied.
---> System.IO.IOException: Permission denied
--- End of inner exception stack trace ---
at System.IO.FileStream.WriteNative(ReadOnlySpan`1 source)
at System.IO.FileStream.FlushWriteBuffer()
at System.IO.FileStream.Dispose(Boolean disposing)
at System.IO.Stream.Close()
at System.IO.StreamWriter.CloseStreamFromDispose(Boolean disposing)
at System.IO.StreamWriter.Dispose(Boolean disposing)
at System.IO.TextWriter.Dispose()
at System.IO.File.WriteAllText(String path, String contents)
at NzbDrone.Common.Processes.PidFileProvider.Write() in D:\a\1\s\src\NzbDrone.Common\Processes\PidFileProvider.cs:line 37
--- End of inner exception stack trace ---
at NzbDrone.Common.Processes.PidFileProvider.Write() in D:\a\1\s\src\NzbDrone.Common\Processes\PidFileProvider.cs:line 42
at Radarr.Host.Bootstrap.Start(StartupContext startupContext, IUserAlert userAlert, Action`1 startCallback) in D:\a\1\s\src\NzbDrone.Host\Bootstrap.cs:line 37
at NzbDrone.Console.ConsoleApp.Main(String[] args) in D:\a\1\s\src\NzbDrone.Console\ConsoleApp.cs:line 41
The /config/radarr.pid
gets generated from within the container so it absolutely has rw
access to it, so I'm guessing the Unable to write PID file /config/radarr.pid
message is incorrect and it might have more to do with the execution than read/write permissions.
Here's how I'm mounting the volume from the kubernetes yaml
- name: master-share-config
flexVolume:
driver: "fstab/cifs"
fsType: "nfs"
secretRef:
name: "master-share-secret"
options:
networkPath: "//MACHINE_IP_ADDRESS/apps/radarr/"
mountOptions: "dir_mode=0755,file_mode=0644,uid=k8sadmin,gid=k8sadmin,rw,exec,dev,suid"
Things I've tried that didn't work:
mountOptions
cifs
nfs
Things I've tried that did work:
I've been trying this for a while now, I'm almost certain it's either the setup of samba share or the way the volume is being claimed.
Please note, that I've used the fstab/cibs
plugin to help out on debugging this, I'm not keen on remounting a drive over and over again into the containers, but it seemed to work to mount the drive. Having said that, I'm not entirely sure fsType: "nfs"
is doing anything as the logs don't state you can do it. But as I said, mounting from /etc/fstab
doesn't work either.
If someone has a solution and/or encountered a similar issue before please let me know.
Also, because I was able to run it from a folder on the worker machine, I can only assume it's an issue with the samba or samba claim.
Ok, after typing all that I've found my own question. Started to investigate if fsType: "nfs"
was working. Turns out I wasn't using nfs at all, not even nfs mount tools were installed.
After fixing all of that it just worked.
I'll leave it here hopefully it can help others.