bug: pod spec doesn't match sts template spec
メンテナーはふだん 1 日以内に返信
@razvan がすでに取り組んでいます。
2026年3月3日 から。
評価
この issue はまだ評価されていません。
説明
Workaround
Ensure catalog definitions are created before creating the Trino cluster.
Proper solution is probably to have a separate controller for the catalogs.
Tasks
- ...
- Revert https://github.com/stackabletech/trino-operator/pull/857, so we test the "normal" way of creating TrinoClusters before TrinoCatalogs again.
- Revert https://github.com/stackabletech/nifi-operator/pull/907, so we test the "normal" way of creating TrinoClusters before TrinoCatalogs again.
Description
TL;DR: The tests create the Trino cluster and then the iceberg catalog definition. In the first reconciliation pass, the operator doesn't find this catalog so it applies a StatefulSet version without the necessary export statements. In a second pass, the operator updates the STS definition but the Pod is not updated. This new behaviour is caused by the MaxUnavailableStatefulSet feature gate in Kubernetes 1.35.
Upsteam issue to bring more clarity: https://github.com/kubernetes/kubernetes/issues/137409
Update 3: The beta feature alone is responsible for this bug. It is present even if the sts/pods are not annotated by other controllers (I uninstalled commons and secret from the cluster).
Update 2: The beta feature MaxUnavailableStatefulSet (enabled by default in v1.35.0) is responsible for this bug. See More Tests below.
Update: Apparently this bug depends on the Kubernetes version. See More Tests below.
In some circumstances the pod spec of Trino pods (coordinator and worker) do not match the template spec of the corresponding StatefulSet objects.
Currently one pod field is known to be different, and this is the container args field.
This was discovered while investigating the failure of the opa-authorization integration tests.
In this test, the Trino pods fail to start. The error message is:
trino java.lang.RuntimeException: Environment variable is not set: CATALOG_ICEBERG_S3_AWS_ACCESS_KEY
trino at io.airlift.configuration.secrets.SecretsResolver.lambda$getResolvedConfiguration$0(SecretsResolver.java:49)
trino at io.airlift.configuration.secrets.SecretsResolver.lambda$getResolvedConfiguration$1(SecretsResolver.java:61)
trino at java.base/java.util.Map.forEach(Unknown Source)
trino at io.airlift.configuration.secrets.SecretsResolver.getResolvedConfiguration(SecretsResolver.java:56)
trino at io.airlift.configuration.secrets.SecretsResolver.getResolvedConfiguration(SecretsResolver.java:48)
trino at io.trino.connector.DefaultCatalogFactory.createCatalog(DefaultCatalogFactory.java:127)
trino at io.trino.connector.LazyCatalogFactory.createCatalog(LazyCatalogFactory.java:44)
trino at io.trino.connector.StaticCatalogManager.lambda$loadInitialCatalogs$1(StaticCatalogManager.java:159)
trino at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
trino at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
trino at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
trino at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30)
trino at java.base/java.util.concurrent.ExecutorCompletionService.submit(Unknown Source)
trino at io.trino.util.Executors.executeUntilFailure(Executors.java:46)
trino at io.trino.connector.StaticCatalogManager.loadInitialCatalogs(StaticCatalogManager.java:153)
trino at io.trino.server.Server.doStart(Server.java:140)
trino at io.trino.server.Server.lambda$start$0(Server.java:79)
trino at io.trino.$gen.Trino_479_stackable0_0_0_dev____20260302_093346_1.run(Unknown Source)
trino at io.trino.server.Server.start(Server.java:79)
trino at io.trino.server.TrinoServer.main(TrinoServer.java:37)
The failure comes from the fact that the pod spec is missing the following statements from the args field:
export CATALOG_ICEBERG_S3_AWS_ACCESS_KEY="$(cat /stackable/secrets/s3-credentials-class/accessKey)"
export CATALOG_ICEBERG_S3_AWS_SECRET_KEY="$(cat /stackable/secrets/s3-credentials-class/secretKey)"
These statements are present in the StatefulSet objects trino-coordinator-default and trino-worker-default.
Since the STS objects are correct, the operator doesn't reconcile them so the pods are left in a failure state.
Forcing the operator pod to restart "fixes" the problem.
More tests
| Result | Kubernetes Version | Notes |
|---|---|---|
| ❌ | 1.35.0 | CI |
| ❌ | 1.35.1 | Local minikube cluster |
| ✅ | 1.35.1 (with MaxUnavailableStatefulSet feature gate disabled)[^1] |
Local minikube cluster |
| ✅ | 1.34.3 | CI |
Attempts to fix
- ❌ Raise the
spec.minReadySecondsfor theStatefulSetfrom0(default) to1seconds.
There is also a bug report related to this field which looks like it may also have implications here. - ❌ Change
spec.updateStrategy.typefor theStatefulSettoOnDelete. - ❌ Do not create
poddisruptionbudgets. - ❌ Uninstall the
commons,secretandlisteneroperator to make sure no annotations are added to the sts/pods.
[^1]: To test with the disabled feature gate, I created a new cluster with the command below:
minikube start \
--kubernetes-version=v1.35.1 \
--nodes 1
--cpus=6
--memory=33518MB
--insecure-registry oci.stackable.tech
--addons metrics-server
--extra-config=controller-manager.feature-gates=MaxUnavailableStatefulSet=false
--extra-config=apiserver.feature-gates=MaxUnavailableStatefulSet=false
- 主要言語
- Rust
- スター
- 64
- フォーク
- 14
- 平均マージ
- 1日 4時間
- マージ済み PR(30日)
- 11
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
stackabletech/trino-operator のほかの issue
-
customer-request
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
stackabletech/trino-operator#499 ·
メンテナーはふだん 1 日以内に返信
-
type/bug
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
stackabletech/trino-operator#936 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Add Iceberg REST catalog support to TrinoCatalog対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
stackabletech/trino-operator#849 ·
メンテナーはふだん 1 日以内に返信
-
customer-request type/feature-improvement
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
stackabletech/trino-operator#813 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
stackabletech/trino-operator#806 ·
メンテナーはふだん 1 日以内に返信
stackabletech/trino-operator の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
RustCrypto/SSH#596 ·
-
proxy: SQL-over-HTTP turns empty arrays into [""] or [false], or HTTP 500 for int and float arraysオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
neondatabase/neon#12965 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
goauthentik/authentik#26867 ·
メンテナーはふだん 1 日以内に返信
-
api bug macos maintainer-needed p2 triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 1 日以内に返信
-
area::tern difficulty::easy good first issue kind::cleanup triage::ready
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100