-
Notifications
You must be signed in to change notification settings - Fork 462
test/e2e: check that kernel-rt-core pacakge is installed #1969
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
Conversation
It seems the kernel-rt-core package may change uname -a content. In older package it included substring PREEMPT RT which we were using to determine that current booted kernel in rt kernel. This changed recently to PREEMPT_RT, due to which tests started failing. To test if node is on rt-kernel, check that kernel-rt-core package is installed.
|
let's wait and see how it goes with this /approve |
cgwalters
left a comment
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 as is
|
|
||
| kernelInfo := execCmdOnNode(t, cs, infraNode, "uname", "-a") | ||
| if !strings.Contains(kernelInfo, "PREEMPT RT") { | ||
| kernelInfo := execCmdOnNode(t, cs, infraNode, "chroot", "/rootfs", "rpm", "-qa", "kernel-rt-core") |
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 -a there is unnecessary (but fine as is, we can address it in a followup). We should also probably make execCmdOnNode do the chroot /rootfs internally because basically everything else in this function is targeting the real root too.
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.
-a is not necessary but -a explicitly says query/verify all packages and that made me use it :)
yeah, you are right. We can look at execCmdOnNode() to do chroot /rootfs
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 funny thing is the other uses of execCmdOnNode play from outside the chroot by just string matching on files within /rootfs - but I agree we can implement chroot in the function to make it transparent that commands are executed on the node's root directly
| kernelInfo = execCmdOnNode(t, cs, infraNode, "uname", "-a") | ||
| if strings.Contains(kernelInfo, "PREEMPT RT") { | ||
| kernelInfo = execCmdOnNode(t, cs, infraNode, "chroot", "/rootfs", "rpm", "-qa", "kernel-rt-core") | ||
| if strings.Contains(kernelInfo, "kernel-rt-core") { |
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.
| if strings.Contains(kernelInfo, "kernel-rt-core") { | |
| if strings.hasPrefix(kernelInfo, "kernel-rt-core") { |
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 for the feedback! let's fix this in a followup PR to unblock tests and pending prs.
|
This can't affect anything except our own tests, no reason to waste resources on testing the install with this |
|
@cgwalters: Overrode contexts on behalf of cgwalters: ci/prow/e2e-aws, ci/prow/e2e-aws-scaleup-rhel7 DetailsIn 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. |
|
can someone add lgtm label |
|
skip isn't friendly when test is running |
|
/skip |
|
@sinnykumari: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
|
/skip |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters, runcom, sinnykumari The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thanks 🎉 |
It seems the kernel-rt-core package may change uname -a
content. In older package it included substring PREEMPT RT
which we were using to determine that current booted kernel
in rt kernel.
This changed recently to PREEMPT_RT, due to which tests started
failing. Hopefully just checking for PREEMPT is sufficient.