-
Notifications
You must be signed in to change notification settings - Fork 441
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
Add UDTF that detects linux kernel header installation and add column to GetAgentStatus
#2052
Add UDTF that detects linux kernel header installation and add column to GetAgentStatus
#2052
Conversation
Signed-off-by: Dom Del Nano <[email protected]>
779cdf4
to
4aca78b
Compare
auto kernel_headers_installed = false; | ||
auto uname = px::system::GetUname(); | ||
if (uname.ok()) { | ||
const auto host_path = px::system::Config::GetInstance().ToHostPath(absl::Substitute("$0/$1/$2", kLinuxHeadersPath, uname.ConsumeValueOrDie(), "build")); | ||
|
||
const auto resolved_host_path = px::system::ResolvePossibleSymlinkToHostPath(host_path); | ||
kernel_headers_installed = resolved_host_path.ok(); | ||
} | ||
|
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.
This duplicates a portion of the work done by BCCWrapper. Another option would be to move that header installation here rather than checking for the presence of the headers. That wouldn't suffer from the test drawbacks outlined here.
…ude kernel_headers_installed Signed-off-by: Dom Del Nano <[email protected]>
Signed-off-by: Dom Del Nano <[email protected]>
Signed-off-by: Dom Del Nano <[email protected]>
6caf3fe
to
312fc86
Compare
@pixie-io/maintainers this is ready for review when you have the chance! |
Signed-off-by: Dom Del Nano <[email protected]>
Signed-off-by: Dom Del Nano <[email protected]>
Signed-off-by: Dom Del Nano <[email protected]>
Summary: Add UDTF that detects linux kernel header installation and add column to
GetAgentStatus
This is a prerequisite to accomplish #2051. The
px deploy
command uses the GetAgentStatus UDTF in its final healthcheck step. With this kernel header detection in place, thepx
cli can use the results from thepx/agent_status
script to print a warning message if kernel headers aren't detected.The helm install flow needs to be covered as well. My hope is that this UDTF could be used for that use case as well, but I need to further investigate the details of that.
Relevant Issues: #2051
Type of change: /kind feature
Test Plan: Skaffolded to a Ubuntu GKE cluster and tested the following
false
as it doesn't bind mount/
to/host
linux-headers-$(uname -r)
package reportsfalse
linux-headers-$(uname -r)
package reportstrue
Changelog Message: Add
GetLinuxHeadersStatus
UDTF and addkernel_headers_installed
column toGetAgentStatus