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

OSValidator doesn't work on Windows #39

Closed
jsturtevant opened this issue Sep 5, 2024 · 8 comments · Fixed by #40
Closed

OSValidator doesn't work on Windows #39

jsturtevant opened this issue Sep 5, 2024 · 8 comments · Fixed by #40
Assignees

Comments

@jsturtevant
Copy link

It looks like this supports windows since there is a windows spec but os validator fails:

Validating os...
Validating kernel...
KERNEL_VERSION: 10.0.22631
failed to get os name: exec: "uname": executable file not found in %PATH%
@pacoxu
Copy link
Member

pacoxu commented Sep 6, 2024

/assign

@pacoxu pacoxu removed their assignment Sep 6, 2024
@pacoxu
Copy link
Member

pacoxu commented Sep 6, 2024

This seems to be added for a long time(5 years ago).

Do we have windows CI for this or kubeadm windows CI? @neolit123

@neolit123
Copy link
Member

neolit123 commented Sep 6, 2024

kubeadm team does not, but sig windows had/has e2e tests. currently i believe mostly capz is validating kubeadm. @jsturtevant has this been failing for a while?

this is the first report i see about this, so i wonder if uname exists in some windows servers (and nanoserver) as a stock tool? i don't think it's available by default as it's a unix-ism... yet, long ago i was testing kubeadm on windows and don't remember this being a problem.

@pacoxu
Copy link
Member

pacoxu commented Sep 6, 2024

Probably, I should use the kubelet way https://github.com/kubernetes/kubernetes/blob/1dbf0830c59038822f37eaf5a1d4f7583f1a1081/pkg/kubelet/winstats/version.go#L34-L76 to get the windows kernel version .

@neolit123
Copy link
Member

not a fan of poking the registry.

kernel version is not the problem, as we already use the correct tool for that.
https://github.com/kubernetes/system-validators/blob/1e0d9c33b4d2294743bc03b6154a9538ad64e340/validators/types_windows.go#L52C20-L52C67
an alternative is to just parse ver or powershell (Get-ComputerInfo).OsVersion

the problem is the uname call, for that we can parse various other powershell outputs or just ver.
i will give this a try.

/unassign @pacoxu
/assign

@neolit123
Copy link
Member

actually what the kubelet does with the registry might be the most portable way across various flavors inc nanosever.

@neolit123
Copy link
Member

neolit123 commented Sep 6, 2024

@jsturtevant
Copy link
Author

kubeadm team does not, but sig windows had/has e2e tests. currently i believe mostly capz is validating kubeadm. @jsturtevant has this been failing for a while?

I don't see any issues in kubeadm. I am not sure exactly where it is used in kubeadm though.

I was exploring enabled the e2e_node test suite and found it when validation ran

this is the first report i see about this, so i wonder if uname exists in some windows servers (and nanoserver) as a stock tool?

No I don't think it is used in windows server anywhere. It might be in the e2e test nano server images we use like busybox but that is installed seperately.

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

Successfully merging a pull request may close this issue.

3 participants