Description of problem: An overnight automated update of the package pdns-backend-sqlite-4.6.2-1.el8.x86_64 to pdns-backend-sqlite-4.7.3-1.el8.x86_64 (together with the related pdns base packages) resulted in the pdns server being unable to start, because there is a mandatory schema change described at https://doc.powerdns.com/authoritative/upgrading.html when updating to 4.7. The package did not carry out this schema change, and consequently pdns_server exits on every start attempt with: Exiting because communicator thread died with error: virtual v oid GSQLBackend::getUpdatedMasters(std::vector<DomainInfo>&, std::unordered_set<DNSName>&, CatalogHashMap&) unable to retrieve list of master domains: Unable to compile SQLite statement : 'select domains.id, domains.name, domains.type, domains.notified_serial, domains.options, domains.catalog, records.content from records join domains on records.domain_id=domains.id and records.name=domains.name where records.type='SOA' and records.disabled=0 and domains.type in ('MASTER', 'PRODUCER')': no such column: domains.options (1) Version-Release number of selected component (if applicable): pdns-backend-sqlite-4.7.3-1.el8.x86_64 How reproducible: Every time Steps to Reproduce: 1. Set up PDNS to use the SQLite back-end in version 4.6. 2. Update Actual results: Crashes with the above error message. Expected results: Schema is updated automatically and server is able to start. Additional info: I resolved this in my case by researching and running the schema update manually. I report the error for the benefit of others.
The mandatory schema update - https://raw.githubusercontent.com/PowerDNS/pdns/master/modules/gsqlite3backend/4.3.1_to_4.7.0_schema.sqlite3.sql - adds the column which is given as missing in the above error message, plus another column and an index. This issue was experienced by me with the SQLite back-end, but will exist with other SQL back-ends too.
So far, we haven't received any reports of issues after upgrading from version 4.6 to 4.7. A database upgrade is required, but the service should still run even without the database upgrade. In our tests, PowerDNS ran without issues after upgrading to version 4.7.x, even without the database upgrade. We tested it with PostgreSQL, MySQL, and SQLite as the database backends. I apologize for the problems you encountered during the upgrade. Due to various reasons, as a packager maintainer, we are not allowed to make changes to other components such as the database. Therefore, the database upgrade needs to be performed by you. Since this is not a bug, I'm closing the ticket. Furthermore, I would like to provide you with some information regarding the upgrade. PowerDNS 4.6 will soon reach its end of life (EOL). Please see: https://doc.powerdns.com/authoritative/appendices/EOL.html. RHEL 8 and RHEL 9 will be supported until 2029 and 2032. Therefore, it is necessary for us to upgrade to newer versions in order to ensure the availability of appropriate bug fixes and security updates. Maybe it could be a feature request to the PowerDNS developers to have PowerDNS itself automatically perform the database upgrade.