Skip to content

Commit b99ad57

Browse files
authored
Upgrade style guide (#157)
* Update upgrade guide for Luna Streaming 3.1 with improved clarity and details * Enhance documentation for Luna Streaming 3.1 with additional examples and troubleshooting tips * remove-migrate-page-content * spelling-and-build-push
1 parent b7466ff commit b99ad57

File tree

4 files changed

+78
-204
lines changed

4 files changed

+78
-204
lines changed

modules/install-upgrade/nav.adoc

-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@
44
* xref:supported-versions.adoc[]
55
* xref:production-cluster-sizing.adoc[]
66
* xref:cluster-sizing-reference.adoc[]
7-
* xref:migration.adoc[]
87
* xref:upgrade-guide.adoc[]

modules/install-upgrade/pages/migration.adoc

-3
This file was deleted.

modules/install-upgrade/pages/upgrade-guide.adoc

+78-125
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
= Upgrade Luna Streaming from 2.10 to 3.1
22
:navtitle: Upgrade from 2.10 to 3.1
33

4-
Upgrading to Luna Streaming 3.1 should only be done from Luna Streaming 2.10.
4+
This guide provides instructions and recommendations for upgrading Luna Streaming from version 2.10 to 3.1.
55

6-
Upgrade is fully supported for all the components including connectors.
6+
Upgrades to Luna Streaming 3.1 should only be performed from Luna Streaming 2.10.
7+
8+
All Luna Streaming 2.10 components support the upgrade to 3.1.
79

810
== Functional impacts
911

1012
This section describes changes in Luna Streaming 3.1 that may impact how your deployment functions.
1113

1214
=== Default system topics
1315

14-
In Pulsar 3.1, system topics are enabled by default.
16+
In Pulsar 3.1, system topics are now enabled by default.
1517

16-
=== Prometheus metrics
18+
=== Prometheus metrics changes
1719

18-
Changes in Prometheus Metrics:
20+
Prometheus metrics have been updated in Luna Streaming 3.1.
1921

20-
* Prometheus Client version has changed from 0.5.0 to 0.16.0
21-
* Prometheus Metric type UNTYPED is renamed to UNKNOWN
22-
* Metrics have been renamed because OpenMetrics's counter name needs a _total suffix
22+
* Prometheus Client version has changed from `0.5.0` to `0.16.0`
23+
* Prometheus Metric type `UNTYPED` is renamed to `UNKNOWN`
24+
* Metrics have been renamed because OpenMetrics's counter name needs a `_total` suffix
2325

2426
.Renamed metrics
2527
[cols="2,2"]
@@ -111,7 +113,7 @@ Changes in Prometheus Metrics:
111113
|pulsar_txn_append_log_total
112114
|===
113115

114-
The following PRs have been merged to update metrics:
116+
The following PRs were merged to update metrics:
115117

116118
* https://github.com/apache/pulsar/pull/13785[#13785 - Bump prometheus client version from 0.5.0 to 0.15.0]
117119
* https://github.com/apache/pulsar/pull/16581[#16581 - Rename Pulsar txn metrics to specify OpenMetrics]
@@ -120,199 +122,156 @@ The following PRs have been merged to update metrics:
120122
* https://github.com/apache/pulsar/pull/16591[#16591 - Bump prometheus client version from 0.15.0 to 0.16.0]
121123
* https://github.com/apache/pulsar/pull/17419[#17419 - Removed timestamp from all prometheus metrics.]
122124

123-
=== Pulsar-SQL
124-
125-
If you're upgrading Pulsar SQL from 2.11 or earlier, you should copy the config files from `conf/presto` to `trino/conf`.
126-
127-
If you're downgrading Pulsar SQL to 2.11 or earlier from newer versions, copy the config files from `trino/conf` to `conf/presto`.
128125

129126
=== Other functional impacts
130127

128+
The following PRs were merged in Luna Streaming 3.1 that may impact your deployment's functionality.
129+
131130
[cols="1,2,3"]
132131
|===
133132
|PR Link |Title |Functional Impact
134133

135134
|https://github.com/apache/pulsar/pull/19180[#19180]
136-
|[cleanup][broker] Deprecate blocking AuthorizationService, AuthorizationProvider methods
135+
|Deprecate blocking AuthorizationService, AuthorizationProvider methods
137136
|This will affect the public API for the AuthorizationService and the AuthorizationProvider, which only impacts users that are running custom code inside the Pulsar Broker
138137

139138
|https://github.com/apache/pulsar/pull/19182[#19182]
140-
|[cleanup][broker] Remove AuthorizationProvider methods deprecated in 2.7 and 2.9
139+
|Remove AuthorizationProvider methods deprecated in 2.7 and 2.9
141140
|Removing deprecated methods allowTenantOperationAsync, allowTenantOperation, allowNamespaceOperationAsync, allowNamespaceOperation, allowNamespacePolicyOperationAsync, allowNamespacePolicyOperation, allowTopicOperationAsync, allowTopicOperation. These methods could be used by third party extensions
142141

143142
|https://github.com/apache/pulsar/pull/19197[#19197]
144-
|[feat][broker] Update AuthenticationProvider to simplify HTTP Authn
143+
|Update AuthenticationProvider to simplify HTTP Authn
145144
|This changes the public API within the broker as some methods are marked as @Deprecated
146145

147146
|https://github.com/apache/pulsar/pull/19295[#19295]
148-
|[feat][broker] OneStageAuth State: move authn out of constructor
147+
|OneStageAuth State: move authn out of constructor
149148
|This could break 3rd party plugins in the broker if they were relying on authentication to happen in the constructor. In order to make those implementations fail fast, this PR includes a change to throw an exception when the getAuthRole is called without first calling authenticateAsync or authenticate. That makes these changes semi-backwards compatible.
150149

151150
|https://github.com/apache/pulsar/pull/19314[#19314]
152-
|[fix][broker] TokenAuthenticationState: authenticate token only once
151+
|TokenAuthenticationState: authenticate token only once
153152
|In a sense, this breaks an implicit contract that the class had. However, because the getAuthRole() method will throw an exception if called incorrectly, it is likely that misuse of this class will result in a fail fast behavior.
154153

155154
|https://github.com/apache/pulsar/pull/19455[#19455]
156-
|[improve][broker] Require authRole is proxyRole to set originalPrincipal
155+
|Require authRole is proxyRole to set originalPrincipal
157156
|This change affects the binary protocol's usage without changing the binary protocol itself. Upgrading existing proxies will not work if the proxyRoles is not correctly configured in the broker.conf.
158157

159158
|https://github.com/apache/pulsar/pull/19486[#19486]
160-
|[improve][client] Remove default 30s ackTimeout when setting DLQ policy on java consumer
159+
|Remove default 30s ackTimeout when setting DLQ policy on java consumer
161160
|Removed setting default ackTimeoutMillis in java ConsumerBuilder when a deadLetterPolicy is set. It has to be specified exclusively to use.
162161
|===
163162

164163
== Configuration impacts
165164

166-
=== Removed in 3.1
165+
This section describes changes in Luna Streaming 3.1 that may impact your deployment's configuration.
167166

168-
* https://github.com/apache/pulsar/pull/14506[#14506] removes `managedLedgerNumWorkerThreads`. The `MetadataStore` instance is passed from the `PulsarService` directly to the `ManagedLedgerFactory`.
167+
=== Configuration values removed in 3.1
169168

170-
* The `conf/presto` directory has been removed.
169+
* https://github.com/apache/pulsar/pull/14506[PR #14506] removes `managedLedgerNumWorkerThreads`.
170+
The `MetadataStore` instance is now passed from the `PulsarService` directly to the `ManagedLedgerFactory`.
171171

172-
=== Deprecated and default values changed in 3.1
172+
* The Pulsar SQL `conf/presto` directory has been removed.
173+
** If you're upgrading Pulsar SQL from 2.11 or earlier, copy the Pulsar SQL config files from `conf/presto` to `trino/conf`.
174+
** If you're downgrading Pulsar SQL to 2.11 or earlier from newer versions, copy the Pulsar SQL config files from `trino/conf` to `conf/presto`.
173175

174-
.`broker.conf` and `standalone.conf` values
175-
[cols="1,1,1"]
176-
|===
177-
|Configuration |Luna Streaming 2.10 Default | Luna Streaming 3.1 Default
178-
179-
|Managed ledger cache eviction frequency
180-
|`managedLedgerCacheEvictionFrequency=100.0`
181-
|`managedLedgerCacheEvictionFrequency=0`
182-
183-
|Max unacked ranges to persist in ZooKeeper
184-
|`managedLedgerMaxUnackedRangesToPersistInZooKeeper=1000`
185-
|`managedLedgerMaxUnackedRangesToPersistInZooKeeper=-1`
186-
|===
176+
=== Default values changed or deprecated in 3.1
187177

188-
=== Changed in 3.1
178+
The following default values in `broker.conf` and `standalone.conf` have changed or been deprecated in Luna Streaming 3.1.
189179

190180
.`broker.conf` and `standalone.conf` values
191181
[cols="1,1,1"]
192182
|===
193183
|Configuration |Luna Streaming 2.10 Default | Luna Streaming 3.1 Default
194184

185+
|`managedLedgerCacheEvictionFrequency``
186+
|`100.0`
187+
|`0`
188+
189+
|`managedLedgerMaxUnackedRangesToPersistInZooKeeper`
190+
|`1000`
191+
|`-1`
192+
195193
|`systemTopicEnabled`
196-
Enable or disable system topic
197-
|false
198-
|true
194+
|`false`
195+
|`true`
196+
199197
|`topicLevelPoliciesEnabled`
200-
Enable or disable topic level policies (depends on system topic)
201-
|false
202-
|true
198+
|`false`
199+
|`true`
200+
203201
|`supportedNamespaceBundleSplitAlgorithms`
204-
Supported algorithms for namespace bundle split
205202
|`range_equally_divide`,`topic_count_equally_divide`,`specified_positions_divide`
206203
|`range_equally_divide`,`topic_count_equally_divide`,`specified_positions_divide`,`flow_or_qps_equally_divide`
204+
207205
|`loadBalancerDirectMemoryResourceWeight`
208-
Direct memory usage weight for calculating resource usage in `ThresholdShedder ` strategy
209-
|1.0
210-
|0
206+
|`1.0`
207+
|`0`
208+
211209
|`fileSystemProfilePath`
212-
File System Storage profile path
213210
|`../conf/filesystem_offload_core_site.xml`
214211
|`conf/filesystem_offload_core_site.xml`
212+
215213
|`gcsManagedLedgerOffloadMaxBlockSizeInBytes`
216-
Max block size in bytes for Google Cloud Storage ledger offload
217-
|67108864
218-
|134217728
214+
|`67108864`
215+
|`134217728`
219216
|===
220217

221218
== Operational impacts
222219

223220
This section describes changes in Luna Streaming 3.1 that may impact how your deployment operates.
224221

225-
=== Upgrade to JDK 17
222+
=== JDK 17 upgrade
226223

227-
Luna Streaming 3.1 uses JDK 17. This changes the Pulsar server module's javac release version to 17.
224+
Luna Streaming 3.1 uses JDK 17.
228225

229-
Client and client-server shared modules will remain at the target Java 8 release.
226+
The Pulsar server module's `javac` release version is `17`.
230227

231-
The modification is described in detail in PIP-156 in https://github.com/apache/pulsar/pull/15207[#15207].
228+
Client and client-server shared modules remain at the target Java 8 release.
232229

233-
=== Removed Python 2 support
230+
This modification is described in detail in https://github.com/apache/pulsar/pull/15207[PIP-156].
234231

235-
Luna Streaming 3.1 removes Python 2 from build scripts.
236-
237-
Python3 is used in the build image.
232+
=== Python 2 support removed
238233

239-
The build image has been updated to ubuntu:20.04 as there is no Python 3.7 support in the old Ubuntu.
234+
Luna Streaming 3.1 removes Python 2 from build scripts.
240235

241-
Executable scripts have been updated to use python3 instead of python.
236+
Python 3 is used in the build image.
242237

243-
The modification is described in detail in PIP-155 in https://github.com/apache/pulsar/pull/15376[#15376]
238+
The build image is updated to use `ubuntu:20.04`, as there is no Python 3.7 support in the previous Ubuntu image.
244239

245-
=== Updated Prometheus metrics
240+
Executable scripts have been updated to invoke `python3` instead of `python`.
246241

247-
Prometheus metrics have been updated in Luna Streaming 3.1.
248-
249-
See <<Prometheus metrics>> for details.
242+
This modification is described in detail in https://github.com/apache/pulsar/pull/15376[PIP-155]
250243

251244
== Known issues
252245

253246
This section describes known issues encountered when upgrading to Luna Streaming 3.1.
254247

255248
=== Bookkeeper / RocksDB format
256249

257-
Pulsar 3.1 uses RocksDB 7.x, which writes in a format that is not compatible with RocksDB 6.x, which is used by LunaStreaming 2.10 via Bookkeeper 4.14.
258-
259-
**Downgrading to 2.10 from 3.1 is not supported for Bookies and ZooKeeper**. All other components such as Broker, Proxy and Functions Worker can be downgraded at any time.
250+
**Downgrading to Luna Streaming 2.10 from Luna Streaming 3.1 is not supported for Bookies and ZooKeeper**.
260251

261-
For more information, see https://github.com/apache/pulsar/issues/22051[(Bug) Downgrade issue #22051 - apache/pulsar · GitHub].s
252+
Pulsar 3.1 uses RocksDB `7.x`, which writes in a format that is not compatible with RocksDB `6.x`.
262253

263-
To reproduce the issue where Bookkeeper instances fail to downgrade:
254+
Luna Streaming 2.10 uses Bookkeeper 4.14, which uses RocksDB `6.x`.
264255

265-
. Install Luna Streaming 2.10.
266-
. Upgrade to Luna Streaming 3.1.
267-
. Downgrade to Luna Streaming 2.10.
256+
All other components such as Broker, Proxy, and Functions Worker can be downgraded at any time.
268257

269-
Stack trace for the downgrade failure:
270-
271-
[%collapsible]
272-
=====
273-
[source,java]
274-
----
275-
2024-02-23T11:42:13,993+0000 [main] INFO org.apache.bookkeeper.bookie.storage.ldb.SingleDirectoryDbLedgerStorage - Creating single directory db ledger storage on data/bookkeeper/ledgers/current
276-
2024-02-23T11:42:14,146+0000 [main] INFO org.apache.bookkeeper.proto.BookieNettyServer - Shutting down BookieNettyServer
277-
2024-02-23T11:42:14,155+0000 [main] ERROR org.apache.bookkeeper.server.Main - Failed to build bookie server
278-
java.io.IOException: Error open RocksDB database
279-
at org.apache.bookkeeper.bookie.storage.ldb.KeyValueStorageRocksDB.<init>(KeyValueStorageRocksDB.java:200) ~[com.datastax.oss-bookkeeper-server-4.14.5.1.0.2.jar:4.14.5.1.0.2]
280-
at org.apache.bookkeeper.bookie.storage.ldb.KeyValueStorageRocksDB.<init>(KeyValueStorageRocksDB.java:89) ~[com.datastax.oss-bookkeeper-server-4.14.5.1.0.2.jar:4.14.5.1.0.2]
281-
at org.apache.bookkeeper.bookie.storage.ldb.KeyValueStorageRocksDB.lambda$static$0(KeyValueStorageRocksDB.java:63) ~[com.datastax.oss-bookkeeper-server-4.14.5.1.0.2.jar:4.14.5.1.0.2]
282-
at org.apache.bookkeeper.bookie.storage.ldb.LedgerMetadataIndex.<init>(LedgerMetadataIndex.java:68) ~[com.datastax.oss-bookkeeper-server-4.14.5.1.0.2.jar:4.14.5.1.0.2]
283-
at org.apache.bookkeeper.bookie.storage.ldb.SingleDirectoryDbLedgerStorage.<init>(SingleDirectoryDbLedgerStorage.java:170) ~[com.datastax.oss-bookkeeper-server-4.14.5.1.0.2.jar:4.14.5.1.0.2]
284-
at org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage.newSingleDirectoryDbLedgerStorage(DbLedgerStorage.java:150) ~[com.datastax.oss-bookkeeper-server-4.14.5.1.0.2.jar:4.14.5.1.0.2]
285-
at org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage.initialize(DbLedgerStorage.java:129) ~[com.datastax.oss-bookkeeper-server-4.14.5.1.0.2.jar:4.14.5.1.0.2]
286-
at org.apache.bookkeeper.bookie.Bookie.<init>(Bookie.java:818) ~[com.datastax.oss-bookkeeper-server-4.14.5.1.0.2.jar:4.14.5.1.0.2]
287-
at org.apache.bookkeeper.proto.BookieServer.newBookie(BookieServer.java:152) ~[com.datastax.oss-bookkeeper-server-4.14.5.1.0.2.jar:4.14.5.1.0.2]
288-
at org.apache.bookkeeper.proto.BookieServer.<init>(BookieServer.java:120) ~[com.datastax.oss-bookkeeper-server-4.14.5.1.0.2.jar:4.14.5.1.0.2]
289-
at org.apache.bookkeeper.server.service.BookieService.<init>(BookieService.java:52) ~[com.datastax.oss-bookkeeper-server-4.14.5.1.0.2.jar:4.14.5.1.0.2]
290-
at org.apache.bookkeeper.server.Main.buildBookieServer(Main.java:304) ~[com.datastax.oss-bookkeeper-server-4.14.5.1.0.2.jar:4.14.5.1.0.2]
291-
at org.apache.bookkeeper.server.Main.doMain(Main.java:226) ~[com.datastax.oss-bookkeeper-server-4.14.5.1.0.2.jar:4.14.5.1.0.2]
292-
at org.apache.bookkeeper.server.Main.main(Main.java:208) ~[com.datastax.oss-bookkeeper-server-4.14.5.1.0.2.jar:4.14.5.1.0.2]
293-
Caused by: org.rocksdb.RocksDBException: unknown checksum type 4 in data/bookkeeper/ledgers/current/ledgers/000006.sst offset 1020 size 33
294-
at org.rocksdb.RocksDB.open(Native Method) ~[org.rocksdb-rocksdbjni-6.10.2.jar:?]
295-
at org.rocksdb.RocksDB.open(RocksDB.java:239) ~[org.rocksdb-rocksdbjni-6.10.2.jar:?]
296-
at org.apache.bookkeeper.bookie.storage.ldb.KeyValueStorageRocksDB.<init>(KeyValueStorageRocksDB.java:197) ~[com.datastax.oss-bookkeeper-server-4.14.5.1.0.2.jar:4.14.5.1.0.2]
297-
... 13 more
298-
----
299-
=====
258+
For more information, see https://github.com/apache/pulsar/issues/22051[Issue 22051].
300259

301260
== Upgrade procedure
302261

303-
Luna Streaming can be deployed on Bare metal, Docker, and Kubernetes.
262+
Luna Streaming can be deployed on bare metal, Docker, and Kubernetes.
304263

305-
This guide will only address Kubernetes deployment.
264+
This guide only addresses Kubernetes deployment.
306265

307266
For more information on upgrading bare metal and Docker Pulsar deployments, see the https://pulsar.apache.org/docs/3.3.x/administration-upgrade/[Pulsar documentation].
308267

309-
=== Kubernetes deployment using KAAP Operator
268+
=== Upgrade Kubernetes deployment with KAAP Operator
310269

311-
Deploying Luna Streaming on Kubernetes with KAAP (Kubernetes Autoscaling for Apache Pulsar) Operator is a common method for running Pulsar in a cloud-native environment.
270+
Upgrade to Luna Streaming 3.1 on Kubernetes with the KAAP (Kubernetes Autoscaling for Apache Pulsar) operator.
312271

313272
For more information, see the xref:kaap-operator::index.adoc[KAAP documentation].
314273

315-
. Back up your existing Pulsar data and configurations to prevent data loss.
274+
. To prevent data loss, back up your existing Pulsar data and configuration files.
316275
. To save your current Helm release configuration, run the following command:
317276
+
318277
[source,bash,subs="+quotes"]
@@ -327,7 +286,7 @@ helm get values *RELEASE-NAME* > pulsar-backup-values.yaml
327286
helm repo update
328287
----
329288
+
330-
. Open `helm/kaap-stack/values.yaml` and update the image tag to 3.1.0 (or the specific tag you wish to use).
289+
. Open `helm/kaap-stack/values.yaml`, and then update the image tag to `3.1.0` (or the specific tag you wish to use).
331290
+
332291
[source,yaml]
333292
----
@@ -343,7 +302,7 @@ kaap:
343302
datastax/lunastreaming-all: 3.1_4.5
344303
----
345304
+
346-
. Review and modify any other configuration parameters that may have changed between versions, such as resource limits, storage classes, and additional components. To modify other configurations, update `values.yaml` as needed. For example, to modify the broker's namespace shedding and splitting configurations, update the following fields:
305+
. To modify other configurations, update `values.yaml` as needed. For example, to modify the broker's namespace shedding and splitting configurations, update the following fields:
347306
+
348307
[source,yaml]
349308
----
@@ -387,18 +346,13 @@ kubectl get pods --namespace *NAMESPACE*
387346
kubectl logs *POD-NAME* -n *NAMESPACE*
388347
----
389348

390-
. After upgrading, check if any additional configurations are required for new features in version 3.1. Adjust settings related to multi-tenancy, security, and observability as needed. Ensure all necessary configurations are in place and correct after the upgrade.
391-
. Test the functionality of your Pulsar cluster by sending messages and ensuring that consumers can read them without issues. Conduct functional tests to ensure that the upgrade did not impact existing applications and that new features work as expected.
392-
393-
// known issues
349+
. After the upgrade, ensure all necessary configurations are in place and correct.
394350

395-
=== Kubernetes deployment using Helm chart
351+
=== Upgrade Kubernetes deployment with Helm chart
396352

397353
The Helm chart for Luna Streaming is available in the https://github.com/datastax/pulsar-helm-chart/blob/master/helm-chart-sources/pulsar/values.yaml[Helm chart sources] repository.
398354

399-
Deploying Luna Streaming on Kubernetes using the DataStax Helm chart is another common method for running Pulsar in a cloud-native environment.
400-
401-
. Back up your existing Pulsar data and configurations to prevent data loss.
355+
. To prevent data loss, back up your existing Pulsar data and configuration files.
402356
. To save your current Helm release configuration, run the following command:
403357
+
404358
[source,bash,subs="+quotes"]
@@ -413,7 +367,7 @@ helm get values *RELEASE-NAME* > pulsar-backup-values.yaml
413367
helm repo update
414368
----
415369
+
416-
. Open `helm-chart-sources/pulsar/values.yaml` and update the image tag to 3.1.0 (or the specific tag you wish to use).
370+
. Open `helm-chart-sources/pulsar/values.yaml` and update the image tag to `3.1.0` (or the specific tag you wish to use).
417371
+
418372
[source,yaml]
419373
----
@@ -487,7 +441,6 @@ kubectl get pods --namespace *NAMESPACE*
487441
kubectl logs *POD-NAME* -n *NAMESPACE*
488442
----
489443

490-
. After upgrading, check if any additional configurations are required for new features in version 3.1. Adjust settings related to multi-tenancy, security, and observability as needed. Ensure all necessary configurations are in place and correct after the upgrade.
491-
. Test the functionality of your Pulsar cluster by sending messages and ensuring that consumers can read them without issues. Conduct functional tests to ensure that the upgrade did not impact existing applications and that new features work as expected.
444+
. After the upgrade, ensure all necessary configurations are in place and correct.
492445

493446

0 commit comments

Comments
 (0)