[SERVER-62635] Add sleep intervals between fixture start/stops in audit shutdown tests Created: 14/Jan/22  Updated: 29/Oct/23  Resolved: 20/Jan/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.3.0, 5.0.7

Type: Task Priority: Minor - P4
Reporter: Adam Rayner Assignee: Adam Rayner
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0
Sprint: Security 2022-01-24
Participants:
Linked BF Score: 168

 Description   

shutdown.js is failing with a "Target already exists during log rotation." error when nodes start.

This is likely a result of https://jira.mongodb.org/browse/SERVER-61699 wherein we have the server fail to start if the log file cannot be rotated.

The tests in question do not sleep between starts / restarts, thus filename collisions with the rotated log file are possible.

Increasing a sleep to 2 seconds between start/stop commands should address this.

 

[js_test:shutdown] s21273| 2022-01-05T13:04:24.807+00:00 D1 ASSERT 23074 [main] "User assertion","attr":{"error":"FileRenameFailed:  target=/data/db/job5/mongorunner/audit-logs/mongodb-eed21d46385b412690bddd83ca8f3feb-audit.log.2022-01-05T13-04-24, file=/data/db/job5/mongorunner/audit-logs/mongodb-eed21d46385b412690bddd83ca8f3feb-audit.log","file":"src/mongo/db/modules/enterprise/src/audit/audit_manager.cpp","line":299}
 


 Comments   
Comment by Githook User [ 04/Apr/22 ]

Author:

{'name': 'Adam Rayner', 'email': 'adam.rayner@gmail.com', 'username': 'adamtron'}

Message: SERVER-62635 backport sleep intervals in audit shutdown tests
Branch: v5.0
https://github.com/10gen/mongo-enterprise-modules/commit/f08b8dfe00b1cb3587824b55c093327f9cd39377

Comment by Githook User [ 19/Jan/22 ]

Author:

{'name': 'Adam Rayner', 'email': 'adam.rayner@gmail.com', 'username': 'adamtron'}

Message: SERVER-62635 Add 2 second delays between server restarts in audit tests - avoid rotated filename collisions
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/508c1e30d54ee8c3686bf74157b97f0adc6bea4f

Generated at Thu Feb 08 05:55:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.