Skip to content
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

[BUG] config.xml reset by Sonarr when the container restarts #270

Closed
1 task done
joestump opened this issue Nov 7, 2023 · 2 comments
Closed
1 task done

[BUG] config.xml reset by Sonarr when the container restarts #270

joestump opened this issue Nov 7, 2023 · 2 comments

Comments

@joestump
Copy link

joestump commented Nov 7, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I am currently trying to set up the *arr applications and hit a snag with sqlite as my volumes are on NFS and load times for the apps was glacial at best w/ tons of lock errors in the event logs.

No worries, I can use PGSQL according to the docs! Sadly, this functionality is not working in Sonarr as it appears to completely reset the config.xml removing the PGSQL parameters.

NOTE: This does not happen with Prowlarr (I haven't tested the other *arr apps).

Expected Behavior

The docs strongly imply (emphasis mine) that these PGSQL parameters should already exist in the config.xml but they do not:

We need to tell Sonarr to use Postgres. The config.xml should already be populated with the entries we need:

qstick
qstick
5432
postgres14

This is not true. None of the config.xml files for my *arr have these already.

Expected one of:

  • config.xml is NOT overwritten when the Sonarr container is restarted OR
  • The container respects POSTGRES_ env vars and auto-configures it (preferred)

Steps To Reproduce

  1. Spin up Sonarr container
  2. Edit config.yaml on the host to have Postgres settings
  3. Restart the Sonarr container
  4. config.yaml is reset

See container info here from Portainer:

screencapture-portainer-home-stu-mp-2023-11-07-09_26_56

Environment

* OS: Ubuntu 20.04
* Installed via docker-compose

CPU architecture

x86-64

Docker creation

See screenshot above (can't upload screenshots here).

Container logs

at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery (System.Data.CommandBehavior behavior) [0x00006] in <cf516e4846354910b3d60749c894b1bf>:0 
  at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery () [0x00006] in <cf516e4846354910b3d60749c894b1bf>:0 
  at Marr.Data.QGen.UpdateQueryBuilder`1[T].Execute () [0x0003b] in C:\BuildAgent\work\63739567f01dbcc2\src\Marr.Data\QGen\UpdateQueryBuilder.cs:157 
  at NzbDrone.Core.Datastore.BasicRepository`1[TModel].SetFields (TModel model, System.Linq.Expressions.Expression`1[System.Func`2[TModel,System.Object]][] properties) [0x0002a] in C:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Datastore\BasicRepository.cs:246 
  at NzbDrone.Core.Messaging.Commands.CommandRepository.End (NzbDrone.Core.Messaging.Commands.CommandModel command) [0x00000] in C:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Messaging\Commands\CommandRepository.cs:80 
  at NzbDrone.Core.Messaging.Commands.CommandQueueManager.Update (NzbDrone.Core.Messaging.Commands.CommandModel command, NzbDrone.Core.Messaging.Commands.CommandStatus status, System.String message) [0x0005e] in C:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Messaging\Commands\CommandQueueManager.cs:247 
  at NzbDrone.Core.Messaging.Commands.CommandQueueManager.Complete (NzbDrone.Core.Messaging.Commands.CommandModel command, System.String message) [0x00000] in C:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Messaging\Commands\CommandQueueManager.cs:185 
  at NzbDrone.Core.Messaging.Commands.CommandExecutor.ExecuteCommand[TCommand] (TCommand command, NzbDrone.Core.Messaging.Commands.CommandModel commandModel) [0x000e0] in C:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Messaging\Commands\CommandExecutor.cs:96 
  at (wrapper dynamic-method) System.Object.CallSite.Target(System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,NzbDrone.Core.Messaging.Commands.CommandExecutor,object,NzbDrone.Core.Messaging.Commands.CommandModel)
  at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid3[T0,T1,T2] (System.Runtime.CompilerServices.CallSite site, T0 arg0, T1 arg1, T2 arg2) [0x00035] in <69ada62907b24213a012734531df1db1>:0 
  at (wrapper dynamic-method) System.Object.CallSite.Target(System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,NzbDrone.Core.Messaging.Commands.CommandExecutor,object,NzbDrone.Core.Messaging.Commands.CommandModel)
  at NzbDrone.Core.Messaging.Commands.CommandExecutor.ExecuteCommands () [0x00027] in C:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\Messaging\Commands\CommandExecutor.cs:41 
Copy link

github-actions bot commented Nov 7, 2023

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@thespad
Copy link
Member

thespad commented Nov 7, 2023

Sonarr v3.x does not support postgres, which is why your xml is being reset on startup. If you want postgres support you will need to be running v4.x

@thespad thespad closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants