Skip to content

Commit c09f6b7

Browse files
committed
[#31029] YSQL: Add new initdb test flag to --undefok for upgrade tests
Address PR #31753 CI failures on arm-alma8-clang21-release (120 failed tests, all upgrade-test families). The previous commit added --TEST_master_min_live_tservers_before_initdb unconditionally to every master command line in ExternalMiniCluster::StartMaster(). Upgrade tests boot older yb-master binaries from build/db-upgrade/yugabyte_*/bin which do not recognize the flag and exit with: [m-1] ERROR: unknown command line flag 'TEST_master_min_live_tservers_before_initdb' Failed to start masters.: ... /build/db-upgrade/yugabyte_2.25.0.0-b340_linux_release/bin/yb-master Use AppendCsvFlagValue() to append the flag to the existing --undefok list, mirroring the pattern in upgrade_test_base.cc and the existing AppendFlagToAllowedPreviewFlagsCsv() helper in this file. Older masters silently ignore the flag, which is safe: upgrade-test bootstrap loads a pre-baked sys-catalog snapshot and bypasses initdb, so the older master never hits the race the flag was added to fix. Test plan: * Compile-checked locally with ./yb_build.sh release --target integration-tests. * CI on arm-alma8-clang21-release (primary signal: the upgrade-test family no longer fails with "unknown command line flag").
1 parent eeb7dde commit c09f6b7

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/yb/integration-tests/external_mini_cluster.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,12 @@ Result<ExternalMasterPtr> ExternalMiniCluster::StartMaster(
578578
// to start exactly that many tservers immediately after, and (b) the master's RF
579579
// requirement is min(num_tablet_servers, FLAGS_replication_factor), so any test that
580580
// survives the bootstrap eventually needs all of them anyway.
581+
//
582+
// Add the flag to --undefok so that upgrade tests (which boot older yb-master binaries
583+
// from build/db-upgrade/) silently ignore it. Older masters never had this race in
584+
// upgrade scenarios -- they load a pre-baked sys-catalog snapshot and bypass initdb
585+
// altogether -- so being able to skip the flag is safe.
586+
AppendCsvFlagValue(flags, "undefok", "TEST_master_min_live_tservers_before_initdb");
581587
flags.push_back(Format(
582588
"--TEST_master_min_live_tservers_before_initdb=$0", opts_.num_tablet_servers));
583589
if (opts_.enable_ysql_auth) {

0 commit comments

Comments
 (0)