[fix](docker)(regression) Stabilize external test environment - #66313
Conversation
### What problem does this PR solve? Issue Number: None Related PR: apache#66254 Problem Summary: The lightweight Kerberos environment regenerated principal keys on every container start, so keytabs provisioned to remote Doris hosts stopped matching the KDC. A successful Hive baseline restore also skipped the Paimon HMS initialization because the incremental module list did not include those tables. In addition, two file cache regression cases addressed backend endpoints through the third-party Docker host and asserted per-queue soft limits as hard capacity bounds. Use deterministic Kerberos keys, refresh Paimon HMS tables through the incremental module framework, address the single live backend directly in the query-limit case, and validate normal-queue usage against total cache capacity. ### Release note None ### Check List (For Author) - Test: Manual test - Shell syntax check for all changed scripts - Hive bootstrap group test - Paimon HMS module selection and refresh harness - Groovy CONVERSION-phase parse for both changed regression suites - Full external regression was not run because it requires a multi-host Doris cluster and the third-party Docker stack - Behavior changed: No - Does this need documentation: No
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
|
/review |
There was a problem hiding this comment.
Automated review completed for 1efe2108e6ffa47ad40bf645a859a2caf741468e after three convergence rounds.
Overall, the implementation is focused and its runtime/test behavior is internally consistent in the checked-in pipelines. One P2 documentation-contract mismatch remains and is called out inline; I found no critical production-runtime blocker.
Critical checkpoints:
- Goal and correctness: Paimon HMS automatic/explicit selection, Hive2/Hive3 refresh behavior, module SHA commit/retry, deterministic Kerberos rebuilds, BE endpoint discovery, and file-cache queue borrowing were traced end to end. The code paths are sound apart from the documented selection contract.
- Scope and maintainability: The seven changed files are focused on the stated Docker/Hive/Kerberos and regression-test fixes, and they reuse the existing module and cache-statistics mechanisms.
- Concurrency and lifecycle: Baseline restore/full-init paths invalidate the module marker before HQL and mark it only after success. The two KDC realms recreate disjoint keytab files and are health-checked before use; no new production lock or shared-state ordering is introduced.
- Configuration and compatibility: The fixed principal/password/single-enctype inputs plus
ktadd -norandkeymake post-migration rebuilds deterministic. No production protocol, persistence format, storage format, or FE-BE variable propagation change applies. - Tests and observability: The single-BE external pipeline is IPv4-pinned, and its cache capacity is unchanged by any scheduled reset suite. Changed shell scripts passed
bash -n; the module selector was exercised directly. Current compile, style, unit, P0, external, nonConcurrent, cloud, and coverage checks pass. No build or repository test suite was run by this static review. - Performance and security: No material production performance or observability regression was found. The Kerberos change is under Docker/regression infrastructure, outside the production threat model, but its correctness and key lifecycle were still reviewed.
- Transactions and data correctness: No production transaction, persistence, or data-write path is changed.
- User focus: No additional user-provided review focus was present; the whole PR was reviewed.
Requested change: clarify both Hive README rows that enablePaimonHms controls inclusion in the default/all expansion, while an explicit --hive-modules paimon_hms selector intentionally overrides it.
|
/review |
There was a problem hiding this comment.
Request changes: one P2 compatibility issue remains in the new Paimon module selection. The Kerberos rebuild fix and both file-cache regression-test fixes look sound in their supported paths.
Critical checkpoint conclusions
- Goal and proof: The PR addresses four independent environment/test failures. Three fixes achieve their stated goal. Paimon refresh state is recorded only after successful HQL, but the new explicit selector is not Hive-generation-aware. The reported Hive3 harness does not prove the Hive2 or combined-generation path identified inline.
- Scope and clarity: The changes are small and generally focused. The remaining issue is localized to how module availability is normalized before the common Hive2/Hive3 launcher consumes it.
- Concurrency: There is no new shared-memory concurrency. Hive2 and Hive3 can be launched concurrently, and both receive the same
HIVE_MODULES; one Hive2 failure is propagated by the aggregate wait and aborts the launch, which is the concrete effect of the inline issue. - Lifecycle: Full initialization, baseline restoration, incremental refresh, SHA invalidation, and successful-commit ordering were traced. Hive3 avoids duplicate HQL execution and failed refreshes remain retryable. Kerberos startup cleans both realm databases/keytabs before deterministic recreation.
- Configuration: No Doris runtime configuration is added. Existing
enablePaimonHmscorrectly controls default/allinclusion, but it is not a Hive-generation capability signal for explicit selection. - Compatibility: The explicit Paimon module is newly reachable from Hive 2.3.2 even though this stack installs/configures the Hive 3.1 handler path. Official Paimon documentation likewise distinguishes Hive 2.3 and Hive 3.1 connector artifacts: https://paimon.apache.org/docs/master/ecosystem/hive/ . This is the requested change.
- Parallel paths: Hive2/Hive3, refresh/rebuild/fast, restored/missing baseline, default/all/explicit module, and both Kerberos realms were checked. The Hive2 explicit-module path is the only unsupported parallel path found.
- Conditional checks: The single-live-BE skip is load-bearing and documented; live-BE host/config ports correlate in the enabled external pipeline. The Paimon default flag condition is correct, but explicit validation needs a separate Hive3 capability check.
- Test coverage: The existing/manual evidence covers script syntax, Hive3 bootstrap behavior, and Groovy parsing. Add a harness case for explicit
paimon_hmswith Hive2 and with a combined Hive2/Hive3 launch. No full runtime/regression build was run in this static-review environment. - Test results: No golden
.outfiles change. The adjusted queue-size assertion matches clean-start production semantics, and removing the element upper bound matches the lack of element-count enforcement. - Observability: Existing stage/error output, refresh detail, and test skip logs are sufficient for these paths; no new production metrics are needed.
- Persistence/transactions: No Doris EditLog or transaction path changes. Hive module SHA state is persisted only after successful HQL. Kerberos
ktadd -norandkeypreserves key/version as intended: https://web.mit.edu/kerberos/krb5-latest/doc/admin/admin_commands/kadmin_local.html . - Data writes/crash behavior: Changes are limited to test-environment Hive DDL/state and regression assertions. Full rebuild owns destructive bootstrap DDL; failed module execution does not mark the SHA current.
- FE/BE propagation: No new FE/BE variables, RPCs, symbols, or storage formats are introduced.
- Performance: No hot production path changes or material CPU/memory regressions were found. Added shell iteration and test metric aggregation are negligible.
- Other/security: The fixed Kerberos credential is confined to unsupported Docker/regression infrastructure under the repository threat model, not a Doris runtime vulnerability. The live README wording issue is already covered by discussion
r3694601306and was not duplicated.
User focus
No additional review focus was supplied, so the complete seven-file PR was reviewed.
Static validation: bash -n passed for the three changed shell scripts. Builds and runtime regression tests were intentionally not run under the review-runner constraints.
…ty, Paimon fixture, iceberg root-cause reporting (#66433) ### What problem does this PR solve? Issue Number: close #xxx Related PR: #65564, #66313, #66417 Problem Summary: Master port of the remaining external-regression gaps diagnosed on the branch-4.0 pipeline (#66417). #66313 already carried the keytab and baseline fixes to master; this PR carries the rest. All three defects were verified to exist on master by inspection — master shares the same code and the same lightweight Kerberos environment (#65564, which #65939 backported to 4.0). **1. Kerberos HDFS writes fail in the p2 suites (SASL client property missing)** #65564 created `kerberos/conf/hdfs-site.xml.tpl` with `dfs.data.transfer.protection=authentication`. A client that does not set the same property sends a plain `writeBlock` op, `SaslDataTransferServer` closes the socket, the client excludes the only DataNode, and the write fails with could only be written to 0 of the 1 minReplication nodes. There are 1 datanode(s) running and 1 node(s) are excluded in this operation. (through iceberg this surfaces as `IllegalArgumentException: Self-suppression not permitted`). Metadata operations only reach the NameNode and the HMS, so `CREATE DATABASE` / `CREATE TABLE` still succeed and only the write fails. #65564 set the client property in the four `external_table_p0/kerberos` suites but not in the p2 suites that talk to the same kerberized HDFS. On the branch-4.0 pipeline this turned `hive_on_hms_and_dlf` and `iceberg_on_hms_and_filesystem_and_dlf` red on every run; master carries the identical omission. Fix: set `dfs.data.transfer.protection` in every property block that points at the kerberized HDFS. A scan of `:8520`/`:8620` across the whole suite tree finds seven such blocks still missing it: two each in `hive_on_hms_and_dlf`, `iceberg_on_hms_and_filesystem_and_dlf` and `test_paimon_hms_catalog`, plus one in `hdfs_all_test` (currently returns early because `refactor_params_hdfs_kerberos_test` is unset — it would fail the moment it is enabled). The kerberos block of `test_information_schema_timezone` has the same gap but is disabled by an unrelated TODO, so it is left alone. **2. `test_paimon_hms_catalog`: `Unknown database 'hdfs_db'`** The lightweight Kerberos environment starts an empty metastore — `schematool -initSchema` and nothing else. The environment it replaced uploaded `paimon_data` into HDFS and registered `hdfs_db` through `create_paimon_hive_table.hql` on every start; `paimon_data/hdfs_db.db/` is still in the tree but the compose file never mounted it. This restores the fixture on `kerberos1` only (it owns metastore 9583, the only one the suite talks to), runs it before `DORIS_KERBEROS_READY` so nothing races the suites, and aborts the container on failure instead of handing out an environment silently missing `hdfs_db`. Two deliberate differences from the branch-4.0 sibling commit: - **`hdfs_db` only, no `ali_db`/OSS.** Master's pre-#65564 HQL provisioned exactly `hdfs_db`; the `oss_hms_kerberos` case that reads `ali_db` through the kerberized metastore exists only on branch-4.0, master's `ali_db` cases go through the Hive3 metastore, and the golden output here carries only the `hdfs_kerberos` / `hdfs_new_kerberos` blocks. This keeps the jindo/aliyun jars and OSS credentials out of the kerberos stack. - **The fixture is gated on the container role (`HOST`).** Both kerberos containers run the same entrypoint with the same rendered env switch, but only `kerberos1` carries the `sql/`/`paimon_data/`/`auxlib/` mounts — without the gate, `set -e` would abort `kerberos2` the moment `enablePaimonHms` is on. (The branch-4.0 sibling needs the same gate; a follow-up on #66417 will add it.) **3. `IcebergConnectorMetadata`: report the root cause of failed metadata commits** `TableMetadataParser.internalWrite` writes the metadata JSON inside try-with-resources, and `DFSOutputStream` throws the same exception instance from `write` and from `close` once its pipeline has failed, so `Throwable.addSuppressed(this)` replaces the failure with `IllegalArgumentException: Self-suppression not permitted`. The FE log keeps the chain, but the message returned over the MySQL protocol is built from `e.getMessage()` and carries only the wrapper. This switches all nineteen metadata-commit paths — `createTable`, the column/schema updates (including the nested-column and comment variants), the branch/tag operations, and the partition-field operations — to `ExceptionUtils.getRootCauseMessage(e)`. The legacy `IcebergMetadataOps` already reported the root cause for the partition-field trio; the connector rewrite lost that, so this also restores it. Read paths and the drop/rename operations cannot hit self-suppression and keep `e.getMessage()`. **Intentionally not ported from #66417:** the file-cache de-flake. Master's `test_file_cache_features` (rewritten in #66313's lineage) already waits for `disk_resource_limit_mode` / `need_evict_cache_in_advance` to clear before returning, which closes the residual-state window at its source. **Verification (local):** `fe-connector-iceberg` compiles and passes checkstyle (`mvn -pl fe-connector/fe-connector-iceberg package`); the four changed suites compile with the offline groovy compiler; `bash -n` passes on both shell scripts; the compose/env/conf templates render with no leftover placeholders, the rendered XML parses, kerberos1 gets exactly the three new mounts while kerberos2 is unchanged; the settings resolution and the entrypoint role-gate were exercised for all switch/role combinations. The containers themselves need the CI environment and have not been run. ### Release note None ### Check List (For Author) - Test - [x] Regression test - [ ] Unit Test - [ ] Manual test (add detailed scripts or steps below) - [ ] No need to test or manual test. Explain why: - [ ] This is a refactor/code format and no logic has been changed. - [ ] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason - Behavior changed: - [x] No. - [ ] Yes. - Does this need documentation? - [x] No. - [ ] Yes. --------- Signed-off-by: morningman <yunyou@selectdb.com>
What problem does this PR solve?
Issue Number: None
Related PR: #66254
Problem Summary:
The branch-4.0 fix in #66254 also applies to master in four places:
init-hive-baseline.sh, while the incremental Hive module list does not include the Paimon HMS table definitions. The restored environment therefore misses the Paimon databases.test_file_cache_query_limitsends BE brpc and HTTP requests toexternalEnvIp, which identifies the third-party Docker host rather than the backend host in a multi-host deployment.test_file_cache_statisticstreats each queue'smax_sizeas a hard limit even though queues may borrow unused capacity from one another. The actual hard bound is the total file-cache capacity.This PR uses deterministic Kerberos keys, registers Paimon HMS as an incremental Hive module, resolves the single live backend before accessing BE endpoints, and validates normal-queue usage against the sum of all queue capacities.
The ES database-name fix from #66254 is intentionally not included because master has already migrated this suite to external ES catalogs and no longer switches to the old internal P0 database.
Release note
None
Check List (For Author)
bash -nfor all changed shell scriptsdocker/thirdparties/test/run-thirdparties-docker-hive-bootstrap-groups-test.sh