-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
tracing: Remove trace mode and trace type #2353
tracing: Remove trace mode and trace type #2353
Conversation
Added dnm label as this still needs to be manually tested... |
b075d8d
to
090cd8e
Compare
Manual tests worked so please review so we can land y'all! Related: #2363. |
/test |
/cc @liubin. |
090cd8e
to
2a09dd0
Compare
/test |
src/agent/src/config.rs
Outdated
if let Ok(result) = value.parse::<tracer::TraceType>() { | ||
self.tracing = result; | ||
if let Ok(value) = env::var(TRACING_ENV_VAR) { | ||
match value.as_str() { |
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.
Should use get_bool_value
to parse the config value like command-line way?
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.
Good catch @liubin! Updated.
And just a reminder that don't forget to update |
2a09dd0
to
781aa92
Compare
Thanks @liubin - doc also updated. |
/test |
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.
@jodh-intel, I tested this with tracing enabled for runtime and agent in the config file and see an error consistently:
ctr: Failed to check if grpc server is working: rpc error: code = DeadlineExceeded desc = timed out connecting to vsock 2900665692:1024: unknown
With only runtime tracing enabled, I am able run and trace with ctr
. I also tested tracing with the latest from main and don't see this error with agent tracing configured. I verified that the host kernel was built with the CONFIG_VHOST_VSOCK
option and that the module was loaded.
I don't see anything in your PR that explicitly modifies anything related to vsock...thoughts?
781aa92
to
07104ec
Compare
/test |
Hi @cmaf - I've just re-tested on a fully up-to-date Ubuntu 20.04.3 system using Kata 2.2.0-rc0 + this PR with containerd v1.5.5 (72cec4be58a9eb6b2910f5d10f1c01ca47d231c0), and it wfm. If you can still repeat this issue, can you revert to the |
@jodh-intel I tried a completely new install of 20.04 with the latest kata containers built from main, both containerd v1.5.2 and v1.5.5, and I can get tracing output for the agent. Both on bare metal and a VM. However, when I switch to this PR, I get the same error as above. Increasing the timeout did not fix it. I also verified that I am using I used the Log output:
|
I tested this with some changes to |
07104ec
to
d092cc2
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.
@jodh-intel I tested with agent debug enabled and saw an "invalid trace type" error followed by a shutdown of the agent:
Sep 15 19:33:18 test-system kata[175979]: time="2021-09-15T19:33:18.580312355Z" level=debug msg="reading guest console" console-protocol=unix console-url=/run/vc/vm/foo/console.sock name=containerd-shim-v2 pid=175979 sandbox=foo source=virtcontainers subsystem=sandbox vmconsole="Error: invalid trace type"
Sep 15 19:33:18 test-system kata[175979]: time="2021-09-15T19:33:18.583842736Z" level=debug msg="reading guest console" console-protocol=unix console-url=/run/vc/vm/foo/console.sock name=containerd-shim-v2 pid=175979 sandbox=foo source=virtcontainers subsystem=sandbox vmconsole="[\x1b[0;32m OK \x1b[0m] Stopped target \x1b[0;1;39mKata Containers Agent Target\x1b[0m."
The VM eventually shuts down as well. Please see code comments.
src/agent/src/tracer.rs
Outdated
@@ -56,7 +55,7 @@ impl FromStr for TraceType { | |||
} |
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.
L51-53:
"isolated" => Ok(TraceType::Isolated),
"disabled" => Ok(TraceType::Disabled),
_ => Err(TraceTypeError::new("invalid trace type")),
Shoud TraceType be removed and replaced with a boolean like it is elsewhere in the code?
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.
FYI @jodh-intel on a second round of testing, I got the PR working with no error. However, the code referring to TraceType
should probably still be removed.
c648901
to
8023d7e
Compare
@cmaf - I've removed the |
/test |
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.
@jodh-intel I tested it and it is working, but there is a static check failure:
[static-checks.sh:360] INFO: Running golangci-lint on /home/runner/work/kata-containers/kata-containers/src/github.com/kata-containers/kata-containers/src/runtime/cmd/kata-runtime
kata-env.go:153:14: fieldalignment: struct with 520 pointer bytes could be 512 (govet)
type EnvInfo struct {
^
make: *** [Makefile:35: static-checks] Error 1
Remove the `trace_mode` and `trace_type` agent tracing options as decided in the Architecture Committee meeting. See: - kata-containers#2062 Fixes: kata-containers#2352. Signed-off-by: James O. D. Hunt <[email protected]>
8023d7e
to
321be0f
Compare
@cmaf - fixed.
|
/test |
Remove the
trace_mode
andtrace_type
agent tracing options asdecided in the Architecture Committee meeting.
See:
Fixes: #2352.
Signed-off-by: James O. D. Hunt [email protected]