[SERVER-54414] Prevent tests from using /data/db dbpath Created: 09/Feb/21 Updated: 08/Jun/21 Resolved: 08/Jun/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Testing Infrastructure |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mathias Stearn | Assignee: | Robert Guo (Inactive) |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | tig-qwin-eligible, tig-resmoke | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Sprint: | STM 2021-06-14 | ||||||||||||
| Participants: | |||||||||||||
| Story Points: | 1 | ||||||||||||
| Description |
|
|
| Comments |
| Comment by Robert Guo (Inactive) [ 08/Jun/21 ] |
|
I asked around a bit more but unfortunately wasn't able to come up with a good solution with managing /data/db. As Zakhar mentioned above, the /data/db directory isn't baked onto the image; similarly, Evergreen only creates the /data directory in the distro setup script. Resmoke.py also doesn't use /data/db directly. It calls os.makedirs() on its dbpath, which happens to be in /data/db. I'm therefore not sure how we should go about limiting /data/db's permissions given how pervasively its used across many Evergreen projects but its ownership isn't clear. Ideally we shouldn't be doing much outside of Evergreen's workdir,but it's hard to verify that this change won't break other projects if the permission isn't reset for whatever reason. A clang-tidy-based linter could be a possible alternative solution that would be much more targeted at unittests. I'm going to tentatively close this ticket as won't fix given the amount of work across resmoke and build images, but can be persuaded otherwise. Feel free to add an item to dev-prod's stakeholder spreadsheet if you still would like to see this. |
| Comment by Brooke Miller [ 08/Jun/21 ] |
|
Thanks for the response, zakhar.kleyman! Rob's going to investigate this further today. |
| Comment by Robert Guo (Inactive) [ 18/May/21 ] |
|
I like the approach but I think the work should be done in the Server's CI config for now, not globally for all hosts since there may be tasks that do require the default db path. There was a similar request for changing the permissions of /opt (BUILD-2653); it's still in the open state after some discussion. |
| Comment by Mathias Stearn [ 10/Feb/21 ] |
|
Re-opening and refocusing on preventing this from happening again, rather than fixing the specific case |