Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement]: Add Resource Reaper (Ryuk) WCOW support #1140

Open
narcis-ro opened this issue Mar 12, 2024 · 6 comments
Open

[Enhancement]: Add Resource Reaper (Ryuk) WCOW support #1140

narcis-ro opened this issue Mar 12, 2024 · 6 comments
Labels
enhancement New feature or request

Comments

@narcis-ro
Copy link

Testcontainers version

3.8.0 bet

Using the latest Testcontainers version?

Yes

Host OS

Windows

Host arch

X64

.NET version

8

Docker version

Latest

Docker info

latest

What happened?

Ryuk latest version supports Windows containers. Can the default ryuk version be updated to latest version please?

Relevant log output

No response

Additional information

No response

@narcis-ro narcis-ro added the bug Something isn't working label Mar 12, 2024
@narcis-ro narcis-ro changed the title Updates to latest testcontainers/ryuk version to support windows containerz Updates to latest testcontainers/ryuk version to support windows containers Mar 12, 2024
@HofmeisterAn HofmeisterAn added enhancement New feature or request and removed bug Something isn't working labels Mar 19, 2024
@HofmeisterAn HofmeisterAn changed the title Updates to latest testcontainers/ryuk version to support windows containers Add Resource Reaper (Ryuk) WCOW support Mar 19, 2024
@HofmeisterAn HofmeisterAn changed the title Add Resource Reaper (Ryuk) WCOW support [Enhancement]: Add Resource Reaper (Ryuk) WCOW support Mar 19, 2024
@HofmeisterAn
Copy link
Collaborator

I looked into it yesterday and prepared a branch that adds and integrates Ryuk's new version (with WCOW support). Unfortunately, I had forgotten about the limitations of GitHub-hosted runners/Microsoft-hosted agents on Windows (actions/runner-images#6688). Without updating Docker's daemon configuration, we cannot mount the named pipe:

$daemonSettings = New-Object PSObject
$daemonSettings | Add-Member NoteProperty hosts @("npipe://")
$daemonSettings | Add-Member NoteProperty group "Users"
$daemonSettings | ConvertTo-Json | Out-File -FilePath "$($env:ProgramData)\docker\config\daemon.json" -Encoding ASCII
Get-Service -Name *docker* | Restart-Service

If we adjust the configuration before running the tests, Ryuk runs fine, but adding Ryuk support will break the tests for others (using the mentioned runners/agents) if they do not apply the same configuration. As long as the runners/agents do not support it, I do not think we can really add support for this feature (/cc @mdelapenya).

@mdelapenya
Copy link
Contributor

@HofmeisterAn we must update the docs then. And be clear that without that configuration it won't work. wdyt?

@HofmeisterAn
Copy link
Collaborator

Developers can opt out in CI (ephemeral) using TESTCONTAINERS_RYUK_DISABLED. It is probably simpler than applying the configuration. This would be similar to existing configurations (that rely on the Linux Engine) too.

@HofmeisterAn we must update the docs then. And be clear that without that configuration it won't work. wdyt?

Yep, docs + a proper log message sounds good.

@narcis-ro
Copy link
Author

The problem is that if the reaper detects it's windows, it won't start it, even with the custom config to use the new ryuk version

image

https://github.com/testcontainers/testcontainers-dotnet/blob/14f9ad92ece7b5539aed0c8f2f7c5415ab97aab8/src/Testcontainers/Configurations/TestcontainersSettings.cs

@narcis-ro
Copy link
Author

Could we at least remove that if until complete support for WCOW ? This was at least we can use the new images of ruyk that supports windows

The problem is that if the reaper detects it's windows, it won't start it, even with the custom config to use the new ryuk version

image

https://github.com/testcontainers/testcontainers-dotnet/blob/14f9ad92ece7b5539aed0c8f2f7c5415ab97aab8/src/Testcontainers/Configurations/TestcontainersSettings.cs

@HofmeisterAn
Copy link
Collaborator

Could we at least remove that if until complete support for WCOW ? This was at least we can use the new images of ruyk that supports windows

I assume you are referring to the if-statement. Removing this alone is not sufficient to enable or support Ryuk on WCOW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants