Open rhatdan opened 6 years ago
Currently we have people complaining about the noice level of oci-umount. We would like to log at only the info level, by default, but we want people to be able to debug output if the --debug flag is set in the container runtime.
@mrunalp @rhvgoyal WDYT
@crosbymichael Thoughts?
:+1:
Yes to the need of being able to pass debug
flag to hooks so that more verbose logging can be enabled from hooks.
What if you added an annotation to the config.json
that the hook can then read -- avoiding the need to modify the spec? Or maybe we should get runtimes to pass some sort of annotation-style JSON that the hook can then parse (so for example runc
would set org.opencontainers.log_level
or something)?
I agree changing the SPEC Would be problematic, I just believe this should be something between runc and the hooks. since if the user just runs runc --debug, I would expect the entire process to respect the debug flag. That way if Docker or CRI-O or some other container runtime launches runc in the future with a --debug flag, the entire stack runs in debug mode.
The only way of making sure all runtimes obey said rules would be to make a spec change. I think we should come up with a way of passing annotation-style data to a hook, and then we can add spec wording on what informations runtimes should pass.
I don't have a problem with runc
exposing this information, I just don't want OCI hooks to be tied to whatever runc
ends up doing -- if this is something that the current spec cannot do effectively then we should extend the spec accordingly.
Well, we still need some way to debug runC
Currently if I run runc in --debug mode, I want to pass this flag down the the hooks.
One way to do this would be to modify the HooksState to include a debug indicator, but this involves changing the runtime spec. I think we could also change this on the stage commands, but adding a field, or environment variable.
Thoughts?