[SERVER-25549] re-enable read_only_sharded suite Created: 10/Aug/16  Updated: 31/Oct/16  Resolved: 19/Oct/16

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.4.0-rc2

Type: Task Priority: Major - P3
Reporter: Esha Maharishi (Inactive) Assignee: Esha Maharishi (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-25910 fail setShardVersion on mongod if not... Closed
is related to SERVER-22663 Make --shardsvr required for a mongod... Closed
is related to SERVER-22664 Add _overrideShardIdentity configurat... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2016-08-29, Sharding 2016-10-31
Participants:

 Description   

Because these tests restart a shard in queryableBackupMode, they must provide the shardIdentity document for the restarted shard to use through the overrideShardIdentity startup parameter.

However, this parameter must be passed through a yaml configuration file (by design).

Since the shardIdentity document must contain a valid config connection string, we need to add a workaround to either:

1) be able to know before-hand what the config connection string will be, and create a dummy yaml config file in jstests/libs, OR
2) somehow determine the config connection string at runtime and write it to a config yaml file through the javascript helpers for running bash commands (will work for linux-only)

and point the restarted shard to the yaml config file.



 Comments   
Comment by Githook User [ 19/Oct/16 ]

Author:

{u'username': u'EshaMaharishi', u'name': u'Esha Maharishi', u'email': u'esha.maharishi@mongodb.com'}

Message: SERVER-25549 re-enable read_only_sharded suite
Branch: master
https://github.com/mongodb/mongo/commit/0c41f08b3d906e98f3272e427a3e366a9b9754e2

Comment by Esha Maharishi (Inactive) [ 02/Sep/16 ]

Between the following options:

  • make --overrideShardIdentity a command line parameter; serialize (and escape) and pass the shardIdentity JSON document on the command line as a string
  • write the shardIdentity document to a config file using kamran.khan's suggestion, and only provide that one option through the config file (rather than dynamically figuring out all the startup options and writing them to a config file too)

We decided on the latter.

Additional note: Unlike the way queryableBackupMode is used in production by Cloud, currently in the read_only_sharded suite, the original config servers are used by the shards even after they're restarted in queryableBackupMode.

Comment by Kamran K. [ 02/Sep/16 ]

1) be able to know before-hand what the config connection string will be, and create a dummy yaml config file in jstests/libs, OR
2) somehow determine the config connection string at runtime and write it to a config yaml file through the javascript helpers for running bash commands (will work for linux-only)

From a testability perspective, #1 seems like a more robust solution because you'd be working with fixed data, which makes it easier to debug failures. If that solution is not feasible at this time (or seems like it would not adequately test the scenario), then you can use runProgram to write content to disk, like jstests/libs/host_ipaddr.js does.

Comment by Spencer Brody (Inactive) [ 30/Aug/16 ]

Why does this only apply to find.js and get_more.js, but not all the tests in the read_only_sharded suite?

Generated at Thu Feb 08 04:09:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.