Skip to content

[8.16] Use retry logic and real file system in file settings ITs (#116392)#116710

Merged
elasticsearchmachine merged 2 commits intoelastic:8.16from
n1v0lg:backport/8.16/pr-116392
Nov 14, 2024
Merged

[8.16] Use retry logic and real file system in file settings ITs (#116392)#116710
elasticsearchmachine merged 2 commits intoelastic:8.16from
n1v0lg:backport/8.16/pr-116392

Conversation

@n1v0lg
Copy link
Copy Markdown
Contributor

@n1v0lg n1v0lg commented Nov 13, 2024

Backport

This will backport the following commits from main to 8.16:

Questions ?

Please refer to the Backport tool documentation

…6392)

Several file-settings ITs fail (rarely) with exceptions like:

```
java.nio.file.AccessDeniedException: C:\Users\jenkins\workspace\platform-support\14\server\build\testrun\internalClusterTest\temp\org.elasticsearch.reservedstate.service.SnaphotsAndFileSettingsIT_5733F2A737542BE-001\tempFile-001.tmp -> C:\Users\jenkins\workspace\platform-support\14\server\build\testrun\internalClusterTest\temp\org.elasticsearch.reservedstate.service.SnaphotsAndFileSettingsIT_5733F2A737542BE-001\tempDir-002\config\operator\settings.json |  

at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:89) |  
-- | --
  |   | at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) |  
  |   | at sun.nio.fs.WindowsFileCopy.move(WindowsFileCopy.java:317) |  
  |   | at sun.nio.fs.WindowsFileSystemProvider.move(WindowsFileSystemProvider.java:293) |  
  |   | at org.apache.lucene.tests.mockfile.FilterFileSystemProvider.move(FilterFileSystemProvider.java:144) |  
  |   | at org.apache.lucene.tests.mockfile.FilterFileSystemProvider.move(FilterFileSystemProvider.java:144) |  
  |   | at org.apache.lucene.tests.mockfile.FilterFileSystemProvider.move(FilterFileSystemProvider.java:144) |  
  |   | at org.apache.lucene.tests.mockfile.FilterFileSystemProvider.move(FilterFileSystemProvider.java:144) |  
  |   | at java.nio.file.Files.move(Files.java:1430) |  
  |   | at org.elasticsearch.reservedstate.service.SnaphotsAndFileSettingsIT.writeJSONFile(SnaphotsAndFileSettingsIT.java:86) |  
  |   | at org.elasticsearch.reservedstate.service.SnaphotsAndFileSettingsIT.testRestoreWithPersistedFileSettings(SnaphotsAndFileSettingsIT.java:321)
```

This happens in Windows file systems, due to a race condition where the
file settings service is reading the settings file concurrently with the
test trying to modify it (a no-go in Windows). It turns out we have
already addressed this with a retry for one test suite
(elastic#91863), plus addressed a
related issue around mock windows file-systems misbehaving
(elastic#92653).

This PR extends the above fixes to all file-settings related ITs.

(cherry picked from commit 91559da)
@n1v0lg n1v0lg added >test Issues or PRs that are addressing/adding tests :Core/Infra/Settings Settings infrastructure and APIs Team:Core/Infra Meta label for core/infra team auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) labels Nov 13, 2024
@n1v0lg
Copy link
Copy Markdown
Contributor Author

n1v0lg commented Nov 13, 2024

@elasticmachine update branch

@elasticmachine
Copy link
Copy Markdown
Collaborator

There are no new commits on the base branch.

@n1v0lg
Copy link
Copy Markdown
Contributor Author

n1v0lg commented Nov 14, 2024

@elasticmachine update branch

@n1v0lg n1v0lg added the test-windows Trigger CI checks on Windows label Nov 14, 2024
@elasticsearchmachine elasticsearchmachine merged commit b5b710a into elastic:8.16 Nov 14, 2024
@n1v0lg n1v0lg deleted the backport/8.16/pr-116392 branch November 14, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport :Core/Infra/Settings Settings infrastructure and APIs Team:Core/Infra Meta label for core/infra team >test Issues or PRs that are addressing/adding tests test-windows Trigger CI checks on Windows v8.16.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants