Repository navigation
Behave: run gpstart utility-mode tests in CI - #2457
Merged
Merged
Conversation
tuhaihe
marked this pull request as ready for review
December 1, 2026 03:00
Member
Author
reshke
approved these changes
Dec 1, 2026
13 tasks
leborchuk
approved these changes
Dec 3, 2026
The scenario "validate session GUC passed with -x is set" has the @not_implemented tag, so CI does not run it. Remove the tag. The scenario starts the coordinator with gpstart -ma and expects gpcheckcat to fail without -x gp_role=utility. It fails on main, because Cloudberry does not reject non-utility connections to a utility-mode postmaster. The next commit restores that check. Assisted-by: Claude Code
gpstart -m starts the coordinator alone, in utility mode, so that an administrator can do maintenance on an isolated system. Greenplum rejects each connection to such a postmaster unless the client also asks for utility mode (gp_role=utility). Cloudberry lost this check, so any client can connect. Restore the check from Greenplum (gpdb-archive commit 482967c1b4). InitPostgres() sets a flag before it reads the startup packet, and assign_gp_role() clears the flag when the client sets gp_role=utility. Cloudberry needs more exemptions than Greenplum: - A single-node deployment always runs in the utility role, so the check uses IS_UTILITY_BUT_NOT_SINGLENODE(). - The login monitor, background workers (such as logical replication apply workers and parallel workers) and walsenders do not send gp_role, so do not check them. Without this exemption, the TAP test recovery/035_standby_logical_decoding fails. After gpstart -m, a client must set PGOPTIONS='-c gp_role=utility' to connect, as in Greenplum. Assisted-by: Claude Code
TAP nodes run in utility mode, and the test framework sets PGOPTIONS='-c gp_role=utility' for each client. Two blocks in pgbench/001 replace PGOPTIONS to set default_transaction_isolation, so pgbench connects without gp_role=utility. With the utility-mode check from the previous commit, the node rejects these connections and the retry tests 434-443 fail. Keep gp_role=utility in both blocks. Other TAP tests that set PGOPTIONS and then use $node->psql are not affected, because Cluster.pm sets gp_role=utility again inside psql. Assisted-by: Claude Code
The gpstart scenarios that check connections in -m, -m -R and -R mode have the @concourse_cluster tag, so CI does not run them. They only need the single-host demo cluster. Remove the tag from them, and from the foouser setup and cleanup scenarios that they use. Assisted-by: Claude Code
Fix the two problems that stop these scenarios from passing:
- The step "when utility mode is set to {utility_mode}" kept the
quotes around the value. The value never matched "True", so the
step never set PGOPTIONS. Put the quotes in the step pattern.
- The expected error messages were old. psql now prints "connection
to server ... failed:" before FATAL, and PostgreSQL 16 changed the
message for reserved connection slots.
The CI gpstart job now runs 21 scenarios instead of 3.
Assisted-by: Claude Code
tuhaihe
force-pushed
the
behave-gpstart-utility-mode
branch
from
December 4, 2026 07:43
c5e7b61 to
da96451
Compare
tuhaihe
enabled auto-merge (rebase)
December 4, 2026 07:44
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Will rebase after #2452 is merged.
What does this PR do?
Type of Change
Breaking Changes
Test Plan
make installcheckmake -C src/test installcheck-cbdb-parallelImpact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context