-
Notifications
You must be signed in to change notification settings - Fork 26
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
Windows: do not use 'uname' for doing OS validation #40
Windows: do not use 'uname' for doing OS validation #40
Conversation
/kind bug /cc @pacoxu @jsturtevant |
/remove-sig node |
4152641
to
5541cc3
Compare
note: i ran the _windows unit tests locally on WSL |
ea6b5ef
to
f070f22
Compare
ran the tests on my Windows 10 machine:
|
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.
/lgtm
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.
The idea of the OS validator is to check if the host OS is supported. e.g. 'uname' would return 'Linux' on Linux and something else on OSX, BSD. But 'uname' is a Unix tool, and only available on Windows if third party packages are installed like MSYS. - Split the os_validator*.go files for Unix and Windows. - Align the fetching of OS name and kernel version for Windows with the kubelet which uses the CurrentVersion reg key under HKLM. - In the Windows spec use 'Windows Server' as the required name and match it in 'CurrentVersion.ProductName' as a prefix. - Add OS specific unit tests.
f070f22
to
9435f6c
Compare
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.
@pacoxu @jsturtevant
i pushed a small fix for wrong year in license header
https://github.com/kubernetes/system-validators/compare/f070f228e2386f604341c48b5072c1d0a38b4404..9435f6c43ece976ea9deac83a001108b4846b88e
please re-apply lgtm.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jsturtevant, neolit123, pacoxu The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold cancel |
The idea of the OS validator is to check if the host OS is supported. e.g. 'uname' would return 'Linux' on Linux and something else / unsupported on OSX, BSD.
But 'uname' is a Unix tool, and only available on Windows if third party packages are installed like MSYS.
fixes #39