[SERVER-62946] Use failpoints to exercise audit log rotation failure on startup Created: 24/Jan/22  Updated: 29/Oct/23  Resolved: 29/Mar/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.3.2, 6.0.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Adam Rayner Assignee: Adam Rayner
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Enterprise RHEL 8.1 PPC64LE, Enterprise macOS


Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.3
Sprint: Security 2022-03-21, Security 2022-04-04
Participants:
Linked BF Score: 152

 Description   

Currently src/mongo/db/modules/enterprise/jstests/audit/log_rotate_startup.js consistently fails on Enterprise RHEL 8.1 PPC64LE and **Enterprise macOS , because the javascript test runners use GMT-5 (local timezone) on these variants when generating test file names for causing collisions with rotating audit log files, instead of the GMT-0 used by all other tested variants.

The test consistently fails because mongod uses GMT-0 when it rotates files, thus for these two variants, there is never a collision, the server starts normally and the test fails.

To correct this failing test and prevent further false-negatives we can use failpoints to test audit log rotation failing at various points in the process instead of relying on the variable external environment.



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

Author:

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

Message: SERVER-62946 backport Use failpoints to exercise audit log rotation failure on startup
Branch: v5.3
https://github.com/mongodb/mongo/commit/0a157de5aa0d3901d14daf2962b3ca9fd96dae10

Comment by Githook User [ 07/Apr/22 ]

Author:

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

Message: SERVER-62946 backport Use failpoints to exercise audit log rotation failure on startup
Branch: v5.3
https://github.com/10gen/mongo-enterprise-modules/commit/89af4dcb8037933acb857f2b527327198a27b31c

Comment by Githook User [ 29/Mar/22 ]

Author:

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

Message: SERVER-62946 add exit code to servers.js constants
Branch: master
https://github.com/mongodb/mongo/commit/a1fcd03754db721977ba018d3aec434b453e0d23

Comment by Githook User [ 29/Mar/22 ]

Author:

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

Message: SERVER-62946 use failpoints for audit log rotation startup tests instead of file creation
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/acd9d68d8edfa9583485ae675e546ed20755eac4

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