]> git.ipfire.org Git - thirdparty/pdns.git/blame - docs/upgrading.rst
Merge pull request #10251 from Habbie/auth-local-ipv6-redux
[thirdparty/pdns.git] / docs / upgrading.rst
CommitLineData
0e2063c3
PL
1Upgrade Notes
2=============
3
4Before proceeding, it is advised to check the release notes for your
5PowerDNS version, as specified in the name of the distribution file.
6
7Please upgrade to the PowerDNS Authoritative Server 4.0.0 from 3.4.2+.
8See the `3.X <https://doc.powerdns.com/3/authoritative/upgrading/>`__
9upgrade notes if your version is older than 3.4.2.
10
7f3563dd
PD
114.4.x to 4.5.0 or master
12------------------------
13
14Record type changes
15^^^^^^^^^^^^^^^^^^^
16
17The in-database format of ``CSYNC`` and ``IPSECKEY`` records has changed from 'generic' format to its specialized format.
18
19API users might notice that replacing records of these types leaves the old TYPExx records around, even if PowerDNS is not serving them.
20To fix this, enable :ref:`setting-upgrade-unknown-types` and replace the records; this will then delete those TYPExx records.
21Then, disable the setting again, because it has a serious performance impact on API operations.
22
23On secondaries, it is recommended to re-transfer, using ``pdns_control retrieve ZONE``, with :ref:`setting-upgrade-unknown-types` enabled, all zones that have records of those types, or ``TYPExx``, for numbers 45 and 62.
24Leave the setting on until all zones have been re-transferred.
25
d4638952
PL
264.3.x to 4.4.0
27--------------
28
980049a4
PD
29Latency calculation changes
30^^^^^^^^^^^^^^^^^^^^^^^^^^^
31
4b60a6b4
PD
32It turned out that average latency calculations in earlier versions used integers instead of floating point variables, which led to the throwing away of any data points between 'the current average' and 1000ms above it, instead of having those data points affecting the average.
33In 4.3.2 and 4.4.0, we `started using floating point variables for this <https://github.com/PowerDNS/pdns/pull/9768/files>`__, which means the latency calculation is accurate now.
34Usually, this means you will see higher latency numbers after upgrading.
980049a4 35
142a0aff
PD
36MySQL character set detection
37^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38
39Before 4.4.0, the gmysql backend told the MySQL (or MariaDB) client libraries to automatically detect the client character set and collation, based on the environment locale.
40(Look for 'autodetect' in https://dev.mysql.com/doc/refman/5.7/en/charset-connection.html to know more).
41On some systems, this autodetection makes choices that are incompatible with MySQL Server 8 defaults.
42On all systems, this autodetection can make choices that vary depending on how PowerDNS is started.
43In other words, the autodetection provides unpredictable results.
44
45In 4.4.0, the autodetection has been removed.
46The MySQL/MariaDB client lib will now use its default settings, unless overridden in ``my.cnf``, for example::
47
48 [client]
49 default-character-set = latin1
50
51If you have trouble connecting to your database with 4.4.0 or up, you can override the character set in ``my.cnf``.
52
53Before upgrading, please check your database for any non-ASCII content.
54The interpretation of the non-ASCII bytes in those fields might change because of a different charset suddenly being used.
55
981c048f
PD
56Record type changes
57^^^^^^^^^^^^^^^^^^^
d4638952 58
c466b354 59The in-database format of the ``SVCB``, ``HTTPS`` and ``APL`` records has changed from 'generic' format to its specialized format.
981c048f 60
981c048f
PD
61API users might notice that replacing records of these types leaves the old TYPExx records around, even if PowerDNS is not serving them.
62To fix this, enable :ref:`setting-upgrade-unknown-types` and replace the records; this will then delete those TYPExx records.
63Then, disable the setting again, because it has a serious performance impact on API operations.
d4638952 64
7f3563dd 65On secondaries, it is recommended to re-transfer, using ``pdns_control retrieve ZONE``, with :ref:`setting-upgrade-unknown-types` enabled, all zones that have records of those types, or ``TYPExx``, for numbers 42, 64, 65.
c221a9cb 66Leave the setting on until all zones have been re-transferred.
7b12cd67 67
5326e0af
PD
68PostgreSQL configuration escaping
69^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
70
71We now correctly quote/escape Postgres connection parameters.
8fc33f55 72If you used single quotes (or some other form of escaping) around your Postgres password because it contained spaces, you now need to put your unmodified, unescaped, unquoted password in your configuration.
5326e0af 73
a03aaad7
PD
74New LMDB schema
75^^^^^^^^^^^^^^^
76
77An LMDB schema upgrade is mandatory.
548b4d38 78Please carefully read :ref:`setting-lmdb-schema-version` before upgrading to 4.4.x. The new schema version is version 3.
a03aaad7 79
e756d013
PD
80Removed features
81^^^^^^^^^^^^^^^^
82
83SOA autofilling (i.e. allowing incomplete SOAs in the database) and the API set-ptr feature, that both were deprecated in earlier releases, have now been removed.
84Please run ``pdnsutil check-all-zones`` to check for incomplete SOAs.
85
f8603612
PD
86The :ref:`setting-do-ipv6-additional-processing` setting was removed. IPv6 additional processing now always happens when IPv4 additional processing happens.
87
4b60a6b4
PD
884.3.1 to 4.3.2
89--------------
90
91Latency calculation changes
92^^^^^^^^^^^^^^^^^^^^^^^^^^^
93
94It turned out that average latency calculations in earlier versions used integers instead of floating point variables, which led to the throwing away of any data points between 'the current average' and 1000ms above it, instead of having those data points affecting the average.
95In 4.3.2 and 4.4.0, we `started using floating point variables for this <https://github.com/PowerDNS/pdns/pull/9786/files>`__, which means the latency calculation is accurate now.
96Usually, this means you will see higher latency numbers after upgrading.
97
98To be very clear, there is no performance difference between 4.3.1 and 4.3.2.
99The only change is in the latency calculation, which was wrong in 4.3.1 and is correct in 4.3.2.
100This fix was backported to 4.3.2 from 4.4.0 so that users can fairly compare the performance of 4.3.2 and 4.4.0.
101
4d34a714
PD
1024.3.0 to 4.3.1
103--------------
104
105On RHEL/CentOS 8, the gmysql backend now uses ``mariadb-connector-c`` instead of ``mysql-libs``.
106This change was made because the default MySQL implementation for RHEL8 is MariaDB, and MariaDB and MySQL cannot be installed in parallel due to conflicting RPM packages.
107The mariadb client lib will connect to your existing MySQL servers without trouble.
108
5e58aee0
PD
109Unknown record encoding (`RFC 3597 <https://tools.ietf.org/html/rfc3597>`__) has become more strict as a result of the fixes for :doc:`PowerDNS Security Advisory 2020-05 <../security-advisories/powerdns-advisory-2020-05>`. Please use ``pdnsutil check-all-zones`` to review your zone contents.
110
1c52074d
PD
111The previous set of indexes for the gsqlite3 backend was found to be poor.
1124.3.1 ships a new schema, and a migration:
113
114.. literalinclude:: ../modules/gsqlite3backend/4.3.0_to_4.3.1_schema.sqlite3.sql
115
0870304c
AT
1164.2.x to 4.3.0
117--------------
118
68b63c08
PD
119NSEC(3) TTL changed
120^^^^^^^^^^^^^^^^^^^
121
122NSEC(3) records now use the negative TTL, instead of the SOA minimum TTL.
123See :ref:`the DNSSEC TTL notes <dnssec-ttl-notes>` for more information.
124
9ed258d5
PL
125Lua Netmask class methods changed
126^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127
128Netmask class methods ``isIpv4`` and ``isIpv6`` have been deprecated in Lua, use :func:`Netmask.isIPv4` and :func:`Netmask.isIPv6` instead. In the C++ API, these methods have been removed.
129
130``socket-dir`` changed
131^^^^^^^^^^^^^^^^^^^^^^
132The default :ref:`setting-socket-dir` has changed to include ``pdns`` in the path.
133It is now whatever is passed to ``--with-socketdir`` during configure (``/var/run`` by default) plus ``pdns``.
134The systemd unit-file is updated to reflect this change and systemd will automatically create the directory with the proper permissions.
135The packaged sysV init-script also creates this directory.
136For other operating systems, update your init-scripts accordingly.
137
138Systemd service and permissions
139^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140The systemd service-file that is installed no longer uses the ``root`` user to start.
141It uses the user and group set with the ``--with-service-user`` and ``--with-service-group`` switches during configuration, "pdns" by default.
142This could mean that PowerDNS cannot read its configuration or zone-file data.
143It is recommended to recursively ``chown`` directories used by PowerDNS::
144
145 # For Debian-based systems
146 chown -R root:pdns /etc/powerdns
147 chown -R pdns:pdns /var/lib/powerdns
148
149 # For CentOS and RHEL based systems
150 chown -R root:pdns /etc/pdns
151 chown -R pdns:pdns /var/lib/pdns
152
153Packages provided on `the PowerDNS Repository <https://repo.powerdns.com>`__ will ``chown`` directories created by them accordingly in the post-installation steps.
154
155New settings
156^^^^^^^^^^^^
157
cefba199
JS
158- The :ref:`setting-axfr-fetch-timeout` setting has been added.
159 This setting controls how long an inbound AXFR may be idle in seconds.
160 Its default is 10
161- The :ref:`setting-max-generate-steps` setting has been added.
162 This sets the maximum number of steps that will be performed when loading a BIND zone with the ``$GENERATE`` directive.
163 The default is 0, which is unlimited.
9ed258d5
PL
164
165Removed settings
166^^^^^^^^^^^^^^^^
167
e326f785 168- :ref:`setting-local-ipv6` has been deprecated, and will be removed in 4.4.0. IPv4 and IPv6 listen addresses can now be set with :ref:`setting-local-address`. The default for the latter has been changed to ``0.0.0.0, ::``.
9ed258d5 169
47fff195
PD
170Schema changes
171^^^^^^^^^^^^^^
cefba199
JS
172- The new 'unpublished DNSSEC keys' feature comes with a mandatory schema change for all database backends (including BIND with a DNSSEC database).
173 See files named ``4.2.0_to_4.3.0_schema.X.sql`` for your database backend in our Git repo, tarball, or distro-specific documentation path.
174 For the LMDB backend, please review :ref:`setting-lmdb-schema-version`.
b66617ed
PD
175- If you are upgrading from beta2 or rc2, AND ONLY THEN, please read `pull request #8975 <https://github.com/PowerDNS/pdns/pull/8975>`__ very carefully.
176
47fff195
PD
177Implicit 5->7 algorithm upgrades
178^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
179
a4a8f6c8 180Since version 3.0 (the first version of the PowerDNS Authoritative Server that supported DNSSEC signing), we have automatically, silently, upgraded algorithm 5 (RSASHA1) keys to algorithm 7 (RSASHA1-NSEC3-SHA1) when the user enabled NSEC3. This has been a source of confusion, and because of that, we introduced warnings for users of this feature in 4.0 and 4.1. To see if you are affected, run ``pdnsutil check-all-zones`` from version 4.0 or up. In this release, the automatic upgrade is gone, and affected zones will break if no action is taken.
0870304c 181
320757b3
PD
182.. _ixfr-in-corruption-4.3.0:
183
184IXFR-in corruption
185^^^^^^^^^^^^^^^^^^
186
187A bug in PowerDNS versions before 4.2.2/4.3.0 would cause wrong deletion or addition of records if IXFR deltas came in very quickly (within the query cache timeout, which defaults to 20/60 seconds).
188If you have zones which use inbound IXFR (in other words, the ``IXFR`` metadata item for that zone is set to ``1``), we strongly suggest triggering a completely fresh transfer.
189You could accomplish that by deleting all records in the zone with an SQL query and waiting for a fresh transfer, or (1) disabling IXFR (2) forcing a fresh transfer using ``pdns_control retrieve example.com`` (3) enabling IXFR again.
190
5e58aee0
PD
1914.2.X to 4.2.3
192--------------
193
194Unknown record encoding (`RFC 3597 <https://tools.ietf.org/html/rfc3597>`__) has become more strict as a result of the fixes for :doc:`PowerDNS Security Advisory 2020-05 <../security-advisories/powerdns-advisory-2020-05>`. Please use ``pdnsutil check-all-zones`` to review your zone contents.
195
f87a4264
PD
1964.X.X to 4.2.2
197--------------
198
199.. _ixfr-in-corruption-4.2.2:
200
201IXFR-in corruption
202^^^^^^^^^^^^^^^^^^
203
204A bug in PowerDNS versions before 4.2.2/4.3.0 would cause wrong deletion or addition of records if IXFR deltas came in very quickly (within the query cache timeout, which defaults to 20/60 seconds).
205If you have zones which use inbound IXFR (in other words, the ``IXFR`` metadata item for that zone is set to ``1``), we strongly suggest triggering a completely fresh transfer.
206You could accomplish that by deleting all records in the zone with an SQL query and waiting for a fresh transfer, or (1) disabling IXFR (2) forcing a fresh transfer using ``pdns_control retrieve example.com`` (3) enabling IXFR again.
207
208
d3dfd71e
PD
2094.1.X to 4.2.0
210--------------
211
212- Superslave operation is no longer enabled by default, use :ref:`setting-superslave` to enable. This setting was called ``supermaster`` in some 4.2.0 prereleases.
367f9b40 213- The gsqlite3 backend, and the DNSSEC database for the BIND backend, have a new journal-mode setting. This setting defaults to `WAL <https://www.sqlite.org/wal.html>`_; older versions of PowerDNS did not set the journal mode, which means they used the SQLite default of DELETE.
4d39fb4b 214- Autoserial support has been removed. The ``change_date`` column has been removed from the ``records`` table in all gsql backends, but leaving it in is harmless.
a84c85c1 215- The :doc:`Generic PostgreSQL backend <backends/generic-postgresql>` schema has changed: the ``notified_serial`` column type in the ``domains`` table has been changed from ``INT DEFAULT NULL`` to ``BIGINT DEFAULT NULL``: ``ALTER TABLE domains ALTER notified_serial TYPE bigint USING CASE WHEN notified_serial >= 0 THEN notified_serial::bigint END;``
d3dfd71e 216
5e58aee0
PD
2174.1.X to 4.1.14
218---------------
219
220Unknown record encoding (`RFC 3597 <https://tools.ietf.org/html/rfc3597>`__) has become more strict as a result of the fixes for :doc:`PowerDNS Security Advisory 2020-05 <../security-advisories/powerdns-advisory-2020-05>`. Please use ``pdnsutil check-all-zones`` to review your zone contents.
221
1346a21e
EW
2224.1.0 to 4.1.1
223--------------
224
225- The :doc:`Generic MySQL backend <backends/generic-mysql>` schema has
226 changed: the ``notified_serial`` column default in the ``domains``
227 table has been changed from ``INT DEFAULT NULL`` to ``INT UNSIGNED
228 DEFAULT NULL``:
229
230 - ``ALTER TABLE domains MODIFY notified_serial INT UNSIGNED DEFAULT NULL;``
231
0e2063c3
PL
2324.0.X to 4.1.0
233--------------
234
22544d28 235- Recursion has been removed, see the :doc:`dedicated migration guide <guides/recursion>`.
7a88a92f 236- ALIAS record expansion is disabled by default, use :ref:`setting-expand-alias` to enable.
bab2a886
EW
237- *Your LDAP schema might need to be updated*, because new record types
238 have been added (see below) and the ``dNSDomain2`` type has been
239 changed.
22544d28
PL
240- The :doc:`LDAP Backend <backends/ldap>` now supports additional Record types
241
242 - NSEC3
243 - NSEC3PARAM
244 - TLSA
245 - CDS
246 - CDNSKEY
247 - OPENPGPKEY
248 - TKEY
249 - URI
250 - CAA
0e2063c3
PL
251
252Changed options
253^^^^^^^^^^^^^^^
254
255- ``experimental-lua-policy-script`` option and the feature itself have
10200e92
PL
256 been completely dropped. We invite you to use `PowerDNS
257 dnsdist <https://dnsdist.org>`_ instead.
0e2063c3 258
621f5105
PL
259- As recursion has been removed from the Authoritative Server, the
260 ``allow-recursion``, ``recursive-cache-ttl`` and ``recursor`` options have
261 been removed as well.
262
c01b3507
PL
263- ``default-ksk-algorithms`` has been renamed to :ref:`setting-default-ksk-algorithm`
264 and only supports a single algorithm name now.
265
266- ``default-zsk-algorithms`` has been renamed to :ref:`setting-default-zsk-algorithm`
267 and only supports a single algorithm name now.
268
0e2063c3
PL
269Changed defaults
270~~~~~~~~~~~~~~~~
271
ef75af13
EW
272- The default value of :ref:`setting-webserver-allow-from` has been changed from ``0.0.0.0, ::/0`` to ``127.0.0.1, ::1``.
273
0e2063c3
PL
274Other changes
275^^^^^^^^^^^^^
276
277The ``--with-pgsql``, ``--with-pgsql-libs``, ``--with-pgsql-includes``
278and ``--with-pgsql-config`` ``configure`` options have been deprecated.
279``configure`` now attempts to find the Postgresql client libraries via
280``pkg-config``, falling back to detecting ``pg_config``. Use
281``--with-pg-config`` to specify a path to a non-default ``pg_config`` if
282you have Postgresql installed in a non-default location.
283
cb264691 284The ``--with-libsodium`` configure flag has changed from 'no' to 'auto'.
67f12ad9
PL
285This means that if libsodium and its development header are installed, it will be linked in.
286
d001d2e4
PL
287The improved :doc:`LDAP Backend <backends/ldap>` backend now requires Kerberos headers to be installed.
288Specifically, it needs `krb5.h` to be installed.
289
0e2063c3
PL
2904.0.X to 4.0.2
291--------------
292
293Changed options
294^^^^^^^^^^^^^^^
295
296Changed defaults
297~~~~~~~~~~~~~~~~
298
299- :ref:`setting-any-to-tcp` changed from ``no`` to ``yes``
300
3013.4.X to 4.0.0
302--------------
303
304Database changes
305^^^^^^^^^^^^^^^^
306
307No changes have been made to the database schema. However, several
308superfluous queries have been dropped from the SQL backend. Furthermore,
309the generic SQL backends switched to prepared statements. If you use a
310non-standard SQL schema, please review the new defaults.
311
312- ``insert-ent-query``, ``insert-empty-non-terminal-query``,
313 ``insert-ent-order-query`` have been replaced by one query named
314 ``insert-empty-non-terminal-order-query``
315- ``insert-record-order-query`` has been dropped,
316 ``insert-record-query`` now sets the ordername (or NULL)
317- ``insert-slave-query`` has been dropped, ``insert-zone-query`` now
318 sets the type of zone
319
320Changed options
321^^^^^^^^^^^^^^^
322
323Several options have been removed or renamed, for the full overview of
324all options, see :doc:`settings`.
325
326Renamed options
327~~~~~~~~~~~~~~~
328
329The following options have been renamed:
330
331- ``experimental-json-interface`` ==> :ref:`setting-api`
332- ``experimental-api-readonly`` ==> :ref:`setting-api-readonly`
333- ``experimental-api-key`` ==> :ref:`setting-api-key`
334- ``experimental-dname-processing`` ==> :ref:`setting-dname-processing`
335- ``experimental-dnsupdate`` ==> :ref:`setting-dnsupdate`
336- ``allow-dns-update-from`` ==> :ref:`setting-allow-dnsupdate-from`
337- ``forward-dnsupdates`` ==> :ref:`setting-forward-dnsupdate`
338
339Changed defaults
340~~~~~~~~~~~~~~~~
341
342- :ref:`setting-default-ksk-algorithms`
343 changed from rsasha256 to ecdsa256
344- :ref:`setting-default-zsk-algorithms`
345 changed from rsasha256 to empty
346
347Removed options
348~~~~~~~~~~~~~~~
349
350The following options are removed:
351
352- ``pipebackend-abi-version``, it now a setting per-pipe backend.
353- ``strict-rfc-axfrs``
354- ``send-root-referral``
355
356API
357^^^
358
359The API path has changed to ``/api/v1``.
360
361Incompatible change: ``SOA-EDIT-API`` now follows ``SOA-EDIT-DNSUPDATE``
362instead of ``SOA-EDIT`` (incl. the fact that it now has a default value
363of ``DEFAULT``). You must update your existing ``SOA-EDIT-API`` metadata
364(set ``SOA-EDIT`` to your previous ``SOA-EDIT-API`` value, and
365``SOA-EDIT-API`` to ``SOA-EDIT`` to keep the old behaviour).
366
367Resource Record Changes
368^^^^^^^^^^^^^^^^^^^^^^^
369
370Since PowerDNS 4.0.0 the CAA resource record (type 257) is supported.
371Before PowerDNS 4.0.0 type 257 was used for a proprietary MBOXFW
372resource record, which was removed from PowerDNS 4.0. Hence, if you used
373CAA records with 3.4.x (stored in the DB with wrong type=MBOXFW but
374worked fine) and upgrade to 4.0, PowerDNS will fail to parse this
375records and will throw an exception on all queries for a label with
376MBOXFW records. Thus, make sure to clean up the records in the DB.
17f0bbcf
PL
377
378In version 3.X, the PowerDNS Authoritative Server silently ignored records that
379have a 'priority' field (like MX or SRV), but where one was not in the database.
380In 4.X, :doc:`pdnsutil check-zone <manpages/pdnsutil.1>` will complain about this.