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;