From 058e609f3ca3f66bd7ed54a9ff2d0b0e8e6ebfdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3=20=28at=20MongoDB=29?= Date: Fri, 6 Mar 2026 08:34:05 +0000 Subject: [PATCH] SERVER-120971 Allow HostUnreachable in FCVUpgradeDowngradeInBackground in stepdown suites (#49085) GitOrigin-RevId: 85d7378f44fb4c7d6350cf297160656fe9b61d37 --- ...ng_stepdown_fcv_upgrade_downgrade_jscore_passthrough.yml | 4 ++++ .../fcv_upgrade_downgrade_primary_step_down_overrides.yml | 4 ++++ jstests/hooks/run_fcv_upgrade_downgrade_background.js | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/buildscripts/resmokeconfig/matrix_suites/generated_suites/sharding_stepdown_fcv_upgrade_downgrade_jscore_passthrough.yml b/buildscripts/resmokeconfig/matrix_suites/generated_suites/sharding_stepdown_fcv_upgrade_downgrade_jscore_passthrough.yml index e1fc26377d9..68907bdd821 100644 --- a/buildscripts/resmokeconfig/matrix_suites/generated_suites/sharding_stepdown_fcv_upgrade_downgrade_jscore_passthrough.yml +++ b/buildscripts/resmokeconfig/matrix_suites/generated_suites/sharding_stepdown_fcv_upgrade_downgrade_jscore_passthrough.yml @@ -86,6 +86,10 @@ executor: skipEnforceFastCountOnValidate: true - class: CheckOrphansDeleted - class: FCVUpgradeDowngradeInBackground + shell_options: + global_vars: + TestData: + runningWithConfigStepdowns: true - class: CleanEveryN n: 20 matrix_suite: true diff --git a/buildscripts/resmokeconfig/matrix_suites/overrides/fcv_upgrade_downgrade_primary_step_down_overrides.yml b/buildscripts/resmokeconfig/matrix_suites/overrides/fcv_upgrade_downgrade_primary_step_down_overrides.yml index 37c92749b83..0d1bb714876 100644 --- a/buildscripts/resmokeconfig/matrix_suites/overrides/fcv_upgrade_downgrade_primary_step_down_overrides.yml +++ b/buildscripts/resmokeconfig/matrix_suites/overrides/fcv_upgrade_downgrade_primary_step_down_overrides.yml @@ -63,6 +63,10 @@ skipEnforceFastCountOnValidate: true - class: CheckOrphansDeleted - class: FCVUpgradeDowngradeInBackground + shell_options: + global_vars: + TestData: + runningWithConfigStepdowns: true - class: CleanEveryN n: 20 diff --git a/jstests/hooks/run_fcv_upgrade_downgrade_background.js b/jstests/hooks/run_fcv_upgrade_downgrade_background.js index ca3f0ca02b9..cd0b996dd28 100644 --- a/jstests/hooks/run_fcv_upgrade_downgrade_background.js +++ b/jstests/hooks/run_fcv_upgrade_downgrade_background.js @@ -34,6 +34,12 @@ const sendFCVUpDown = function (ver) { jsTest.log.info("setFCV: Temporarily unavailable", {e}); return; } + if (e.code === ErrorCodes.HostUnreachable && TestData.runningWithConfigStepdowns) { + // The mongos may exhaust its retries due to having consecutive config stepdowns. + // In this case, the mongos will return a HostUnreachable error. + jsTest.log.info("setFCV: Host unreachable", {e}); + return; + } if (e.code === ErrorCodes.CannotUpgrade) { jsTest.log.info("setFCV: Can not upgrade", {e}); return;