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

Make windows gradle check server using proper amount of memory in WinRM #242

Merged

Conversation

peterzhuamazon
Copy link
Member

Signed-off-by: Peter Zhu [email protected]

Description

Make windows gradle check server using proper amount of memory in WinRM

Issues Resolved

opensearch-project/opensearch-build-libraries#113

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Comment on lines +8 to +18
$memorygb = [int]$args[0]
$memorygb

if ($memorygb) {
$memorymb = $memorygb * 1024
}
else {
$memorymb = 30 * 1024
}
cmd /c winrm set "winrm/config/winrs" "@{MaxMemoryPerShellMB=\`"$memorymb\`"}"
cmd /c winrm get winrm/config
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please explain this? What it is trying to do?
Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is trying to get user input in GB and convert to MB and apply to WinRM max memory allocation during Jenkins agent node communications.

When Jenkins communicate with Windows node through WinRM it can only allocate the max number of memory in MBs that WinRM allows it to allocate.

This make sure the value is assigned dynamically based on the AMI requirements. Thanks.

@peterzhuamazon peterzhuamazon merged commit f6836ef into opensearch-project:main Feb 14, 2023
@peterzhuamazon peterzhuamazon deleted the adding-100g-windows branch February 14, 2023 18:10
peterzhuamazon added a commit to peterzhuamazon/opensearch-ci that referenced this pull request May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants