[SERVER-19994] Add support for ipv6 in testing framework Created: 17/Aug/15  Updated: 06/Dec/22  Resolved: 19/Nov/21

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: 3.0.5
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Igor Canadi Assignee: Backlog - Server Tooling and Methods (STM) (Inactive)
Resolution: Won't Fix Votes: 1
Labels: stm
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Tooling & Methods
Operating System: ALL
Participants:

 Description   

mongod supports --ipv6 flag, but I can't figure out how to get

{re}

smoke.py to invoke mongod with that flag. Unfortunately my test server is ipv6-only, so it's hard to run tests.



 Comments   
Comment by Brooke Miller [ 19/Nov/21 ]

We don't have plans to address this beyond Max's earlier comment.

Comment by Igor Canadi [ 18/Aug/15 ]

> I think we should use this ticket to track the improvements necessary to make this possible with our testing framework.

Yup, thanks!

> The simplest way (for now) to ensure that all tests are run with IPv6 enabled is probably to just change the default state.

Ah yeah, this will work for the short-term. Thank you Max!

Comment by Max Hirschhorn [ 18/Aug/15 ]

Hi Igor,

There isn't a general way to get mongod or mongos processes to start up with IPv6 enabled as part of our testing framework. I think we should use this ticket to track the improvements necessary to make this possible with our testing framework.

For the processes started by resmoke.py, it is possible to edit the YAML configuration file to change what options are passed. This can be done by adding the key ipv6 under the key mongod_options or mongos_options.

diff --git a/buildscripts/resmokeconfig/suites/core.yml b/buildscripts/resmokeconfig/suites/core.yml
index 5a59657..66e1e3b 100644
--- a/buildscripts/resmokeconfig/suites/core.yml
+++ b/buildscripts/resmokeconfig/suites/core.yml
@@ -14,6 +14,7 @@ executor:
     fixture:
       class: MongoDFixture
       mongod_options:
+        ipv6: ''
         nopreallocj: ''
         set_parameters:
           enableTestCommands: 1

diff --git a/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml b/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml
index 78012fd..fabdf3c 100644
--- a/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml
+++ b/buildscripts/resmokeconfig/suites/sharding_jscore_passthrough.yml
@@ -57,9 +57,11 @@ executor:
     fixture:
       class: ShardedClusterFixture
       mongos_options:
+        ipv6: ''
         set_parameters:
           enableTestCommands: 1
       mongod_options:
+        ipv6: ''
         nopreallocj: ''
         set_parameters:
           enableTestCommands: 1

However, this approach cannot change the command line options for how mongod and mongos processes are started by the ReplTest, ReplSetTest, and ShardingTest helpers (i.e. mongod and mongos processes started by the mongo shell). We could hang some additional property off of the TestData object and have them get passed through.

The simplest way (for now) to ensure that all tests are run with IPv6 enabled is probably to just change the default state.

Generated at Thu Feb 08 03:52:48 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.