-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Use GlobalMemoryStatusEx to get total physical memory on Windows node #57124
Use GlobalMemoryStatusEx to get total physical memory on Windows node #57124
Conversation
/release-note-none |
@marono @trondhindenes Can you help to do sanity check to run kubelet? I don't have VMware fusion/Mac and VirtualBox/Linux handy. I've verified with HyperV/Windows. |
@JiangtianLi I can do VMware Fusion tomorrow |
@JiangtianLi delighted to confirm Thanks and well done! |
@marono Thanks so much for the help! |
This was previously also failing on I am still thinking if kubelet should fail with an error if it couldn't read the memory. On the Linux node from what I see, they ignore the error if it couldn't read the memory. https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/dockershim/cm/container_manager_linux.go#L104-L107 Should the error be ignored if kubelet couldn't fetch the memory? |
Kindly ping @dashpole @tallclair |
cc @kubernetes/sig-windows-bugs |
@bsteciuk can you please review? |
@alinbalutoiu as well |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @JiangtianLi for the clarifications.
The changes looks good to me.
/lgtm |
/test pull-kubernetes-cross |
I restarted the tests and it is green (I think there was flakiness in cross test before and it is skipped this time) |
/retest |
85f9ab6
to
071be11
Compare
@JiangtianLi: Reiterating the mentions to trigger a notification: In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/assign @tallclair |
/lgtm |
/assign @tallclair |
Acked-by: Alin Gabriel Serdean [email protected] I tested the changes using VMware Workstation 12. /lgtm |
@aserdean: changing LGTM is restricted to assignees, and only kubernetes org members may be assigned issues. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@tallclair can you please look into this and approve |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aserdean, dashpole, JiangtianLi, michmike, tallclair The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
/retest Review the full test history for this PR. Silence the bot with an |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
1.9 cherry-pick PR created at #59455 |
What this PR does / why we need it:
This PR fixes issue #57110 due to failure in getting total physical memory on some Windows VM such as in VMWare Fusion or Virtualbox. This change uses GlobalMemoryStatusEx instead of GetPhysicallyInstalledSystemMemory to retrieve total physical memory on Windows node. The amount obtained this way is also closer in parity with reading MemTotal from /proc/meminfo on Linux node.
(thanks to @martinivanov and @marono for the help)
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #57110
Special notes for your reviewer:
Release note: