[SERVER-30739] config_server_checks.js should assert if initial replSetConfig fails Created: 18/Aug/17  Updated: 30/Oct/23  Resolved: 04/Apr/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 3.6.18, 4.0.18

Type: Bug Priority: Major - P3
Reporter: Matthew Russotto Assignee: Cheahuychou Mao
Resolution: Fixed Votes: 0
Labels: esha-summer-2019-neweng, neweng, sharding-wfbf-day
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.6
Sprint: Sharding 2020-04-20
Participants:
Linked BF Score: 0

 Description   

The config_server_checks.js test runs

rst.nodes[0].adminCommand(

{replSetInitiate: conf}

);

We expect this to cause a network exception due to the node removing itself, but if it does not we should check the result of the command and assert if it is not OK. Otherwise it will fail in

expectState(rst, ReplSetTest.State.REMOVED);

which makes it harder to see that the problem was that the initiate failed, not that the node didn't become REMOVED.



 Comments   
Comment by Githook User [ 05/Apr/20 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com', 'username': 'cheahuychou'}

Message: SERVER-30739 config_server_checks.js should assert if initial replSetConfig fails

(cherry picked from commit 3c97892206735c532cfeda0c0cb045c2b1f2758a)
Branch: v3.6
https://github.com/mongodb/mongo/commit/e51b87a83be5f8f199eb4a25c4d94aec7055cd96

Comment by Githook User [ 03/Apr/20 ]

Author:

{'name': 'Cheahuychou Mao', 'email': 'cheahuychou.mao@mongodb.com', 'username': 'cheahuychou'}

Message: SERVER-30739 config_server_checks.js should assert if initial replSetConfig fails
Branch: v4.0
https://github.com/mongodb/mongo/commit/3c97892206735c532cfeda0c0cb045c2b1f2758a

Comment by Chibuikem Amaechi [ 30/Dec/17 ]

Hi Everyone,

My proposed change would be to add the following line of code:

assert.commandWorked(rst.nodes[0].adminCommand({replSetInitiate: conf}));

immediately after the try-catch block but before expectState(rst, ReplSetTest.State.REMOVED).

If everyone is in agreement, I will be more than happy to open a pull request.

Please share your thoughts!

Best Regards,
Chibuikem Amaechi

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