Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

cmd/log-parser: Add containerID and sandboxID to standard log entry #465

Merged
merged 3 commits into from
Jul 4, 2018

Conversation

jodh-intel
Copy link
Contributor

Extract the container ID from the structured logs and add it to the
standard LogEntry type. This will allow (most of) the log entries to
be associated with individual containers, which will make debugging and
analysis easier.

Also, enhance some of the errors that are returned to make locating the issue
in the log file easier.

Fixes #453.

Signed-off-by: James O. D. Hunt james.o.hunt@intel.com

Copy link
Contributor

@grahamwhaley grahamwhaley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm
Hopefully I'll get to try this soon as well.

@chavafg
Copy link
Contributor

chavafg commented Jul 2, 2018

lgtm

Approved with PullApprove

@chavafg
Copy link
Contributor

chavafg commented Jul 2, 2018

some CI errors:

cmd/log-parser/agent_test.go:174:3:warning: unused struct field github.com/kata-containers/tests/cmd/log-parser.testData.expectContainerField (structcheck)
cmd/log-parser/agent_test.go:173:3:warning: unused struct field github.com/kata-containers/tests/cmd/log-parser.testData.le (structcheck)
cmd/log-parser/agent_test.go:172:7:warning: type testData is unused (U1000) (unused)
Build step 'Execute shell' marked build as failure

@jodh-intel jodh-intel force-pushed the add-cid-to-log-parser branch from a997792 to 68891a3 Compare July 3, 2018 11:59
@jodh-intel
Copy link
Contributor Author

Branch updated.

Enhance some of the errors that are returned to make locating the issue
in the log file easier.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Extract the container ID from the structured logs and add it to the
standard `LogEntry` type. This will allow (most of) the log entries to
be associated with individual containers, which will make debugging and
analysis easier.

Fixes kata-containers#453.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
@jodh-intel jodh-intel force-pushed the add-cid-to-log-parser branch from 68891a3 to 1255a4d Compare July 4, 2018 13:15
@jodh-intel
Copy link
Contributor Author

Branch updated to resolve merge conflict.

@jodh-intel jodh-intel changed the title cmd/log-parser: Add containerID to standard log entry cmd/log-parser: Add containerID and sandboxID to standard log entry Jul 4, 2018
Extract the sandbox ID from the structured logs and add it to the
standard `LogEntry` type. This will allow (most of) the log entries to
be associated with sandboxes, which will make debugging and
analysis easier.

Fixes kata-containers#474.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
@jodh-intel jodh-intel force-pushed the add-cid-to-log-parser branch from 08c38e1 to f329acf Compare July 4, 2018 14:38
@jodh-intel
Copy link
Contributor Author

Branch updated to also pick out the sandboxID. Note that we don't actually need to wait for the PRs on #474 to land before this PR lands as containerID and sandboxID are not mandatory fields (they can't be).

@devimc
Copy link

devimc commented Jul 4, 2018

lgtm

Approved with PullApprove

@chavafg chavafg merged commit d970a5c into kata-containers:master Jul 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants