mchades commented on code in PR #14963: URL: https://github.com/apache/gravitino/pull/14963#discussion_r4564022247
########## docs/migration-guide.md: ########## @@ -28,6 +28,50 @@ existing deployments. For database backup, schema scripts, and rollback commands whole Kubernetes pod CIDR, lets those clients choose the recorded address again. See [HTTP Server](./gravitino-server-config.md#http-server). +### Kafka catalog client upgrade +- The Kafka catalog now ships the Kafka client 3.9.2 instead of 3.4.0. The `gravitino.bypass.` + properties are passed to this client, so check them against the + [Kafka Admin Configs](https://kafka.apache.org/39/documentation.html#adminclientconfigs). +- The Kafka catalog rejects `gravitino.bypass.config.providers` and `gravitino.bypass.config.providers.*` + (for example `.class` and `.param.*`), including when they come from + `catalogs/kafka/conf/kafka.conf`. Kafka 3.5 added an environment variable config provider, and + any provider can read the Gravitino server's own environment or files. In 1.3, the file and + directory providers could be used through these properties. After the upgrade, creating or + altering a catalog with them is rejected, and an existing catalog that still has them fails on + schema and topic operations and on `testConnection`, with an error that names the rejected + properties, until it is updated. +- Before upgrading, while still on 1.3, take an inventory: + 1. List the Kafka catalogs and the `kafka.conf` entries that set `gravitino.bypass.config.providers`. + Its value is a comma-separated list of provider aliases chosen by the operator, for example + `file`, `env`, or `fileProvider`. + 2. For each alias, search the property values of that catalog for `${<alias>:...}` references. + Searching only for `${file:`, `${directory:`, or `${env:` misses custom aliases. See + [Kafka configuration providers](https://kafka.apache.org/39/configuration/configuration-providers/). + 3. Record the value each reference resolves to, and whether it is a credential. +- After upgrading to 2.0, update each affected catalog with one `alterCatalog` call that removes + the provider properties and replaces every reference. An `alterCatalog` call that leaves any + provider property in place is rejected, including a comment-only change. Until this update, + the catalog cannot run Kafka operations, so apply it right after the upgrade. + - Set a non-sensitive value, such as a timeout, as a literal value. + - Do not set a credential as a literal value. Bypass properties can be returned in plaintext by + the REST API: Gravitino masks only keys that match + [sensitive key keywords](./gravitino-server-config.md#sensitive-property-key-matching), so a + password inside `gravitino.bypass.sasl.jaas.config` is returned unchanged. With a Gravitino + secret provider configured, bind the whole property with `CatalogChange.setSecretBinding` + (REST update type `setSecretBinding`) in the same call. `setSecretBinding` is not available in + the 1.3 client or REST API. + - In `kafka.conf`, remove the provider properties and write the resolved values before starting + the 2.0 server. Values from this file are not stored as catalog properties, so restrict access Review Comment: [P1] `kafka.conf` defaults are copied into catalog metadata at creation. I put a synthetic SASL password only in the file, created a catalog, and deleted the file. An ordinary catalog GET still returned the full `gravitino.bypass.sasl.jaas.config`, and the stored entity contained it. Please remove the instruction to write resolved credentials into `kafka.conf`. Keep non-sensitive defaults there, bind credentials per catalog, and explain that editing the file does not update existing catalogs. ########## docs/migration-guide.md: ########## @@ -28,6 +28,50 @@ existing deployments. For database backup, schema scripts, and rollback commands whole Kubernetes pod CIDR, lets those clients choose the recorded address again. See [HTTP Server](./gravitino-server-config.md#http-server). +### Kafka catalog client upgrade +- The Kafka catalog now ships the Kafka client 3.9.2 instead of 3.4.0. The `gravitino.bypass.` + properties are passed to this client, so check them against the + [Kafka Admin Configs](https://kafka.apache.org/39/documentation.html#adminclientconfigs). +- The Kafka catalog rejects `gravitino.bypass.config.providers` and `gravitino.bypass.config.providers.*` + (for example `.class` and `.param.*`), including when they come from + `catalogs/kafka/conf/kafka.conf`. Kafka 3.5 added an environment variable config provider, and + any provider can read the Gravitino server's own environment or files. In 1.3, the file and + directory providers could be used through these properties. After the upgrade, creating or + altering a catalog with them is rejected, and an existing catalog that still has them fails on + schema and topic operations and on `testConnection`, with an error that names the rejected + properties, until it is updated. +- Before upgrading, while still on 1.3, take an inventory: + 1. List the Kafka catalogs and the `kafka.conf` entries that set `gravitino.bypass.config.providers`. Review Comment: Please include `gravitino.bypass.config.providers.*` in the initial inventory even when `gravitino.bypass.config.providers` is absent. I verified that a `kafka.conf` containing only `gravitino.bypass.config.providers.fileProvider.class` blocks creation of every Kafka catalog using that file. The same standalone key in an existing catalog blocks operations. Remove these keys even when there are no aliases or placeholders to migrate. ########## docs/kafka-catalog.md: ########## @@ -76,7 +95,7 @@ workaround. | `partition-count` | The number of partitions for the topic. | if not specified, will use the `num.partitions` property in the broker. | No | | `replication-factor` | The number of replications for the topic | if not specified, will use the `default.replication.factor` property in the broker. | No | -Pass other topic configurations to the topic properties. Refer to [Topic Configs](https://kafka.apache.org/34/documentation.html#topicconfigs) for more details. +Pass other topic configurations to the topic properties. Refer to [Topic Configs](https://kafka.apache.org/39/documentation.html#topicconfigs) for more details. Review Comment: The Kafka 3.9 redirect for `#topicconfigs` sends readers to `/39/configuration/topic-configs/`, which returns HTTP 404. Please link directly to the working [Kafka 3.9 Topic-Level Configs page](https://kafka.apache.org/39/configuration/topic-level-configs/). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
