tracing: Remove trace mode and trace type

Remove the `trace_mode` and `trace_type` agent tracing options as
decided in the Architecture Committee meeting.

See:

- https://github.com/kata-containers/kata-containers/pull/2062

Fixes: #2352.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
James O. D. Hunt
2021-07-29 14:14:57 +01:00
parent 119edcc443
commit 321be0f794
18 changed files with 145 additions and 438 deletions

View File

@@ -117,10 +117,8 @@ type HypervisorInfo struct {
// AgentInfo stores agent details
type AgentInfo struct {
TraceMode string
TraceType string
Debug bool
Trace bool
Debug bool
Trace bool
}
// DistroInfo stores host operating system distribution details.
@@ -157,11 +155,11 @@ type EnvInfo struct {
Meta MetaInfo
Image ImageInfo
Initrd InitrdInfo
Agent AgentInfo
Hypervisor HypervisorInfo
Netmon NetmonInfo
Runtime RuntimeInfo
Netmon NetmonInfo
Host HostInfo
Agent AgentInfo
}
func getMetaInfo() MetaInfo {
@@ -303,8 +301,6 @@ func getAgentInfo(config oci.RuntimeConfig) (AgentInfo, error) {
agentConfig := config.AgentConfig
agent.Debug = agentConfig.Debug
agent.Trace = agentConfig.Trace
agent.TraceMode = agentConfig.TraceMode
agent.TraceType = agentConfig.TraceType
return agent, nil
}

View File

@@ -184,10 +184,6 @@ func getExpectedAgentDetails(config oci.RuntimeConfig) (AgentInfo, error) {
return AgentInfo{
Debug: agentConfig.Debug,
Trace: agentConfig.Trace,
// No trace mode/type set by default
TraceMode: "",
TraceType: "",
}, nil
}
@@ -677,14 +673,10 @@ func TestEnvGetAgentInfo(t *testing.T) {
assert.True(t, agent.Debug)
agentConfig.Trace = true
agentConfig.TraceMode = "traceMode"
agentConfig.TraceType = "traceType"
config.AgentConfig = agentConfig
agent, err = getAgentInfo(config)
assert.NoError(t, err)
assert.True(t, agent.Trace)
assert.Equal(t, agent.TraceMode, "traceMode")
assert.Equal(t, agent.TraceType, "traceType")
}
func testEnvShowTOMLSettings(t *testing.T, tmpdir string, tmpfile *os.File) error {