runtime-tools: log container adjustments.#268
runtime-tools: log container adjustments.#268klihub wants to merge 2 commits intocontainerd:mainfrom
Conversation
a6cac4e to
c0863cc
Compare
c0863cc to
9953d06
Compare
|
@mikebrow @samuelkarp PTAL |
|
@samuelkarp I have a few questions. Related to the approach taken here, is this roughly what you had in mind ? Related to event details, how detailed events do we want to log, and do we want to log them unconditionally ? The PR now logs unconditionally and detailed events, except in a few extreme cases where details could get really verbose. But should it be configurable, or should details be logged at a different logging level ? About the logged events/messages. The main messages are now exposed consts, with the idea that someone might want to build some tooling where it can come handy to have them exported. But I don't know if this really makes sense. Any thoughts ? |
|
Thanks for jumping on this, @klihub. You raised some important questions in your comment that I think we should probably settle on before finalizing the implementation. Since o11y is a key requirement for GA, could we open a GitHub issue to agree on the specific design goals and requirements first? We can treat this PR as a PoC to inform that discussion, but I'd feel more comfortable if we aligned on the "what" and "why" in a design issue before we iterate further on the "how" here. |
I created issue #270 for that. |
95bd1fb to
ef60131
Compare
ef60131 to
6e1b91b
Compare
6e1b91b to
fada150
Compare
|
@mikebrow @samuelkarp @chrishenzie I tried to address/answer the initial round of review comments and took off the draft status. |
fada150 to
0bceac6
Compare
Add an option for setting an external audit event logger and use any configured logger to emit audit events as we adjust the OCI Spec. Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
Expose owning plugins for adjustments returned by CreateContainer. Include plugin in errors which originate from processing a request by a plugin. Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
0bceac6 to
f27ac91
Compare
|
@chrishenzie Added test cases. PTAL. |
|
|
||
| // Audit 'events' we use in logged audit messages. | ||
| const ( //nolint:revive | ||
| AuditRemoveProcessEnv = "remove environment variable" |
There was a problem hiding this comment.
These are all human-readable strings, but I think it'd actually be more valuable to have something that's closer to the actual field adjustment. For example, process.env which matches the JSON path in the OCI bundle. For being the most precise, I think we might want something as expressive as JSON Patch (RFC 6902); this could describe the exact modification that a plugin is making.
This PR implements NRI audit logging for OCI Spec adjustments, which has been identified as one of the missing things we need to add (be)for(e) a v1.0. This patch
Here are updated trees for contained and CRI-O: