c08e86ef319bdc26f96ff48baade73b9ccfa2b63
[docs.git] / docs / release-notes / upgrade-process.rst
1 ========================
2 Silicon Platform Upgrade
3 ========================
4
5 This document describes the steps to help users upgrade from Aluminium
6 to Silicon planned platform. Refer to `Managed Release Integrated (MRI)
7 project <https://git.opendaylight.org/gerrit/q/topic:silicon-mri>`_
8 upgrade patches for more information.
9
10 .. contents:: Contents
11
12 Preparation
13 -----------
14
15 JDK 11 Version
16 ^^^^^^^^^^^^^^
17 Silicon requires Java 11, both during compile-time and run-time.
18 Make sure to install JDK 11 corresponding to at least ``openjdk-11.0.8``,
19 and that the JAVA_HOME environment variable points to the JDK directory.
20
21 InfraUtils is a MRI project
22 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
23 Unlike in previous releases, the InfraUtils project has joined
24 the MRI family at the end of Aluminium Simultaneous Release cycle.
25 Going forward it is an error to depend on any ``org.opendaylight.infrautils``
26 with a ``-SNAPSHOT`` version.
27
28
29 Version Bump
30 ^^^^^^^^^^^^
31 Before performing platform upgrade, do the following to bump the odlparent
32 versions (for example, `bump-odl-version <https://github.com/skitt/odl-tools/blob/master/bump-odl-version>`_):
33
34 1. Update the odlparent version from 7.0.5 to 8.1.1. There should
35    not be any reference to **org.opendaylight.odlparent**, except
36    for 8.1.1. This includes custom feature.xml templates
37    (``src/main/feature/feature.xml``), the version range should
38    be "[8.1,9)" instead of "[8,9)", "[5.0.3,6)" or any other variation.
39
40  .. code-block:: shell
41
42   bump-odl-version odlparent 7.0.5 8.1.1
43
44 2. Update the direct yangtools version references from 5.0.5 to 6.0.5,
45    There should not be any reference to **org.opendaylight.yangtools**,
46    except for 6.0.5. This includes custom feature.xml templates
47    (``src/main/feature/feature.xml``), the version range should
48    be "[6,7)" instead of "[5,6)".
49
50  .. code-block:: shell
51
52   bump-odl-version odlparent 5.0.5 6.0.5
53
54 3. Update the MD-SAL version from 6.0.4 to 7.0.6. There should not be
55    any reference to **org.opendaylight.mdsal**, except for 7.0.6.
56
57  .. code-block:: shell
58
59   bump-odl-version odlparent 6.0.4 7.0.6
60
61 4. Update the Controller version from 2.0.3 to 3.0.7. There should not be
62    any reference to **org.opendaylight.controller**, except for 3.0.7.
63
64  .. code-block:: shell
65
66   bump-odl-version odlparent 2.0.3 3.0.7
67
68 5. Update the InfraUtils version from 1.8.0 to 1.9.6. There should not be
69    any reference to **org.opendaylight.infrautils**, except for 1.9.6.
70
71  .. code-block:: shell
72
73   bump-odl-version odlparent 1.8.0 1.9.6
74
75 Install Dependent Projects
76 ^^^^^^^^^^^^^^^^^^^^^^^^^^
77 Before performing platform upgrade, users must also install
78 any dependent project. To locally install a dependent project,
79 pull and install the respective `silicon-mri <https://git.opendaylight.org/gerrit/q/topic:silicon-mri>`_ changes for any dependent project.
80
81 Perform the following steps to save time when locally installing
82 any dependent project:
83
84 * For quick install:
85
86  .. code-block:: shell
87
88   mvn -Pq clean install
89
90 * If previously installed, go offline and/or use the
91   no-snapshot-update option.
92
93  .. code-block:: shell
94
95   mvn -Pq -o -nsu clean install
96
97 Upgrade the ODL Parent
98 ----------------------
99 The following sub-section describes how to upgrade to
100 the ODL Parent version 4. Refer to the `ODL Parent Release Notes
101 <https://github.com/opendaylight/odlparent/blob/master/docs/NEWS.rst#version-800>`_
102 for more information.
103
104 Features
105 ^^^^^^^^
106 Any version range referencing version 7 of ODL Parent must be changed
107 to “[8,9)” for ODL Parent 8.1.
108
109  .. code-block:: xml
110
111    <feature name="odl-infrautils-caches">
112        <feature version="[8,9)">odl-guava</feature>
113    </feature>
114
115 ODL Parent Impacts
116 ------------------
117
118 Enforcing maven-modernizer-plugin
119 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120 ODL Parent has switched ``maven-modernizer-plugin`` to enforcing mode
121 and upgraded the rules to reflect Java 11 requirement. The enforcement
122 can be switched off on a per-artifact basis using:
123
124  .. code-block:: xml
125
126    <properties>
127        <odlparent.modernizer.enforce>false</odlparent.modernizer.enforce>
128    </properties>
129
130
131 YANG Tools Impacts
132 ------------------
133
134 SchemaContext is being retired (continued)
135 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136 After many years of development and incremental updates, this release marks
137 the start of the transition away from ``SchemaContext``. The object model
138 exposed by it is problematic in more ways than one. The replacement construct
139 is ``EffectiveModelContext``, which operates on ``EffectiveStatement``
140 and its related interfaces. ``EffectiveModelContext`` retains its
141 ``SchemaContext`` trait for the duration of the transition and can be directly
142 used in that capacity. Users are encouraged to update their interfaces to
143 accept and give out EffectiveModelContext instances.
144
145 In this release this effort resulted in removal of ``SchemaContextProvider``
146 interface and vast majority of sites now require an ``EffectiveModelContext``.
147
148
149 Illegal YANG pattern statements are rejected
150 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
151 YANG parser will no longer silently ignore syntactically-illegal patterns.
152 This may flush out new non-compliant models. For further details see the
153 `corresponding issue <https://jira.opendaylight.org/browse/YANGTOOLS-1136>`__
154
155
156
157 MD-SAL Impacts
158 --------------
159
160 Binding DTOs enforce non-null keys
161 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
162 Binding DTOs (data transfer objects), created through builders for a keyed
163 list now properly enforce non-null key attributes. This means any code that
164 fails to properly set up either ``withKey()`` or individual component leaf
165 values will throw a ``NullPointerException`` like this:
166
167  .. code-block:
168
169     java.lang.NullPointerException: Supplied value may not be null
170             at java.base/java.util.Objects.requireNonNull(Objects.java:246)
171             at org.opendaylight.yangtools.yang.binding.CodeHelpers.requireValue(CodeHelpers.java:63)
172             at org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeKey.<init>(NodeKey.java:18)
173             at org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeBuilder$NodeImpl.<init>(NodeBuilder.java:236)
174             at org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.NodeBuilder.build(NodeBuilder.java:219)
175             at org.opendaylight.ovsdb.southbound.ovsdb.transact.BridgeOperationalStateTest.<init>(BridgeOperationalStateTest.java:57)
176
177 In order to resolve this, check the model involved. It will look something
178 like this:
179
180  .. code-block:
181
182     list node {
183         key id;
184         leaf id {
185             type string;
186         }
187     }
188
189 What the exception is indicating that the ``NodeBuilder`` does not have
190 ``id`` set, so the resulting ``Node`` cannot be constructed, because it
191 has to have a ``NodeKey`` for which ``id`` is mandatory.
192
193 With that knowledge, you should examine the caller and understand how
194 the builder is initialized.
195
196 This change will typically affect incorrect test data, as production values
197 tend to be validated on receiver side and would report this error later
198 down the road. For further details see this
199 `MD-SAL issue <https://jira.opendaylight.org/browse/MDSAL-491>`__.
200
201
202 Augmentation tracking has been reworked
203 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
204 As part of larger life-cycle activities, a number of implementation details
205 have changed to the point as to render the distinction between Augmentable
206 and AugmentationHolder interfaces superfluous. AugmentationHolder has therefore
207 been completely integrated into Augmentable allowing efficient implementation
208 classes and easier augmentation tracking. For further details see this
209 `MD-SAL issue <https://jira.opendaylight.org/browse/MDSAL-577>`__.
210
211
212 DOMNotificationRouter implementation has been reworked
213 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
214 The default implementation of router, which is used for disseminating YANG
215 notifications inside the system, was been reimplemented. The new implementation
216 does not use LMAX Disruptor, but rather is based on QueuedNotificationManager.
217 For further details see this
218 `MD-SAL issue <https://jira.opendaylight.org/browse/MDSAL-546>`__.
219
220
221 DOM interfaces no longer use SchemaPath identification
222 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
223 Interfaces for invocation of ``RPCs`` and ``actions``, as well as
224 publishing ``notifications``  have switched from using ``SchemaPath`` to
225 using either ``QName`` or ``SchemaNodeIdentifier.Absolute``. This allows
226 more efficient invocation and removes ambiguity around relative SchemaPath
227 being or not being allowed.
228
229
230
231 Removed packaging of draft ietf-topology extensions
232 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
233 As part of further cleanup, standardization and stabilization of MD-SAL
234 interfaces, four models from ``draft-clemm-netmod-yang-network-topo-01``
235 have been removed: ``ietf-topology-isis``, ``ietf-topology-ospf``, ``ietf-ted``
236 and ``ietf-topology-l3-unicast-igp``. For further details see this
237 `MD-SAL issue <https://jira.opendaylight.org/browse/MDSAL-590>`__.
238
239
240 Final release to include widened Integer/Long/BigInteger compatibility
241 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
242 Magnesium introduced a change in how ``uint8``, ``uint16``, ``uint32`` and
243 ``uint64`` types are mapped to Java.
244 Previously this would be mapped to Short, Integer, Long and BigInteger
245 respectively.
246 With Magnesium these are mapped to dedicated ``yang.common.Uint{8,16,32,64}``,
247 whose design matches general design of ``java.lang.Integer``.
248
249 This change obviously requires some amount adaptation, which is why
250 compatibility setter methods and constructors are generated, each of which
251 converts the wide type to its native mapping, undoing the widening.
252
253 Such conversions are costly in terms of both CPU usage, but also cost
254 us quite a bit in terms of class size. They also introduce ambiguity, which
255 hinders fluent use native methods.
256
257 Compatibility methods have been deprecated for removal since their inception,
258 and are now officially scheduled for removal in the next major release,
259 Phosphorus. The removal is tracked in
260 `this MD-SAL issue <https://jira.opendaylight.org/browse/MDSAL-490>`__.
261
262
263 Final release to include List/Map compatibility mappers
264 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
265 Aluminium introduced a change in how a keyed list YANG construct is mapped
266 to Java. Previously such lists were mapped to ``java.util.List``. This
267 mapping resulted in incorrect ``equals()`` behavior of generated DTOs
268 for cases the list's ordering is not specified. Furthermore it was not
269 possible to locate entries of such lists through their key. Corrected
270 mapping to ``java.util.Map`` solves both problems.
271
272 A typical impacted YANG snippet would look something like:
273
274  .. code-block:
275
276     list foo {
277         key bar;
278         leaf bar {
279             type string;
280         }
281
282         // ordered-by system; is implied
283     }
284
285 Since the ordering is left up to the system, YANG tools uses hash maps
286 to track such lists, resulting in inherently unstable iteration order.
287
288 If the order of entries is significant, then this needs to be expressed
289 in the model like this:
290
291  .. code-block:
292
293     list foo {
294         key bar;
295         leaf bar {
296             type string;
297         }
298
299         ordered-by user;
300     }
301
302 which maps to ``java.util.List`` again.
303
304 Aluminium-generated code provides compatibility for users using
305 List to access a Map. This layer indexes the presented list into an
306 immutable Map and uses that value. This has both performance and
307 correctness implications.
308
309 Since ``java.util.List`` offers a simple way of building up a set
310 of entries without having to deal with entry keys, a migration utility
311 is provided in the form of
312 ``org.opendaylight.yangtools.yang.binding.util.BindingMap``, which
313 allows almost seamless migration, especially for unit test code.
314
315 The compatibility setters have been deprecated for removal since
316 they inception and are now scheduled for removal. Aluminium is the
317 last release shipping with them. They will be removed in the next
318 release, Phosphorus. The removal is tracked in
319 `this MD-SAL issue <https://jira.opendaylight.org/browse/MDSAL-540>`__.
320
321
322 Controller Impacts
323 ------------------
324
325 Akka remote configuration
326 ^^^^^^^^^^^^^^^^^^^^^^^^^
327 Because of the akka upgrade to 2.6.x in Silicon, remote TCP configuration changed
328 from ``netty.tcp`` to ``classic.netty.tcp``:
329
330  .. code-block:: none
331
332       classic.netty.tcp {
333         hostname = "127.0.0.1"
334         port = 2550
335       }
336
337 Use of ``odl:type`` in Blueprint is discouraged
338 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
339 This property has been used for discerning between various implementations
340 of MD-SAL services present in the OSGi service registry. As these services have
341 been consolidated in the past couple of releases, the use of this qualifier
342 is discouraged. While some services are advertised with this property set, it
343 is no longer considered a binding contract and future releases, even minor,
344 will most likely stop adding this property.
345
346 Users are advised to stop specifying this attribute when making references
347 to OSGi services.
348
349
350 Akka 2.6.12
351 ^^^^^^^^^^^
352 This release integrates ``akka-2.6.12``, which is a major upgrade from previous
353 ``akka-2.5.32``. Most notably the auto-downing feature is no longer present
354 and has been replaced by integrating the split-brain resolver. Please refer
355 to clustering setup guide for required configuration updates.
356