-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
DevProd Test Infrastructure
-
200
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Overview
When a jstest starts a server with test commands disabled (TestData.enableTestCommands = false),
the shell still forwards suite-level failpoint.* setParameters to that server. Failpoints are only registered as server parameters when test commands are enabled, so startup fails with BadValue and the test aborts.
Background
Two tests have hit this. BF-45084 was fixed in SERVER-132907 by splitting the affected sub-test into its own file tagged disables_test_commands, which the variants injecting failpoints exclude. SERVER-131758 added a test with the same pattern and needed the same workaround.
Reproduced locally with the flags the rhel and {{amazon }}{{test_dev_master_branch_only }}variants pass:
resmoke.py run --suites=no_passthrough \
--mongodSetParameters="{'failpoint.WTIndexCreateUniqueIndexesInOldFormat': {mode: 'alwaysOn'}}" \
jstests/noPassthrough/query/analyze_ndv_mode_test_commands_disabled.js
"codeName":"BadValue","errmsg":"Unknown --setParameter 'failpoint.WTIndexCreateUniqueIndexesInOldFormat'" StopError: MongoDB process stopped with exit code: 1
Proposed change
File to modify:
- src/mongo/shell/servers.js
- Around the enableTestCommands handling in the mongod/mongos argument assembly, drop any
failpoint.* setParameters from the argument array when
jsTest.options().enableTestCommands is false, since those parameters cannot exist in such a
server.
- Around the enableTestCommands handling in the mongod/mongos argument assembly, drop any
Acceptance criteria
- A test that sets TestData.enableTestCommands = false and starts a server passes in suites that inject failpoint.* setParameters.
- The disables_test_commands tag can be removed from the affected test files:
- jstests/noPassthrough/query/analyze_histograms_mode_test_commands_disabled.js
- jstests/noPassthrough/query/analyze_ndv_mode_test_commands_disabled.js
Technical notes
- The current per-file disables_test_commands tag is a working workaround; this ticket removes the need for it and stops the pattern from recurring.
- Only failpoint.* parameters are affected. Other test-only parameters are not silently dropped and should be left alone.
- is related to
-
SERVER-132907 Move analyze histograms coverage into its own tagged test file
-
- Closed
-
-
SERVER-131758 Add new NDV mode to analyze() command
-
- Closed
-