-
Notifications
You must be signed in to change notification settings - Fork 51
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
readonly_standy attempts to write to db #861
Comments
This is a confusing error message, but an unavoidable situation when starting a standby instance against an empty database. This is fixed if you set up the SQL replication first, and run a non-standby IRRD at any time against the PostgreSQL primary, the secret key is generated and stored, and standby instances will not attempt to generate their own. An improvement would be for the standby IRRD instance to detect this and issue a clearer error. It can not resolve this situation, because it can not write to a replica database. Even if IRRD's database handler would allow it, PostgreSQL would not. |
This was against a running standby instance. I was an upgrade after an upgrade from 4.3.1 to 4.4.0. The master is runnng 4.4.0 already and replicated those changes. I stepped through |
Ah right, misread the traceback. Definite bug and no workaround. I'll try to get a fixed release out in the next few days, or otherwise early next week. |
…ndby (cherry picked from commit 25751a0)
…ndby (cherry picked from commit 25751a0)
4.4.1 is out with the fix |
Describe the bug
Starting irrd with
readonly_standby: true
fails to start with error "Exception: Attempted to write to SQL database from readonly database handler".To Reproduce
Set
readonly_standby: true
and enabled the http server.Expected behaviour
irrd
to start.IRRd version you are running
4.4.0
Additional context
Traced this out and the decorator on
irrd.webui.helpers.secret_key_derive
always attempts to commit to the database irrespective of the readonly flag.Debug logs when starting irrd:
The text was updated successfully, but these errors were encountered: