containers / youki

A container runtime written in Rust

Home Page:https://containers.github.io/youki/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

systemd_log option seems unused

c3d opened this issue · comments

There is a systemd_log variable in YoukiExtendOpts which is documented as Enable logging to systemd-journald, but I don't see this happening in the code. The variable is passed to the ObservabilityConfig, but I don't see either copy being otherwise used.

I also see no issue tracking this, so I thought it would be worth opening one to track it.

I am currently working on tracing in ociplex. I think that a lot of that could be shared with youki as well. It seems to me like the various logging options should really be moved to GlobalOpts, otherwise we have the rather strange effect that the documentation for debug mentions a log-level flag that does not exist for a user of liboci-cli. If the intent was to separate youki-specific options from options that are defined by the OCI spec, then that should still all be done inside liboci-cli.

Hey, systemd_log is used, and you can see https://github.com/containers/youki/blob/main/crates/youki/src/observability.rs#L70-L87 for the actual code. Currently, it is always enabled in debug builds, and taken according to flags in release builds.
I'm not 100% sure, but the global opts are the ones which are not specifically defined by oci spec, but are accepted by most, if not all, other runtimes. liboci-cli is specifically for the cmd opts which are defined in oci-spec, so I'm not sure if we can add the non-spec opts there ; but we can see if global opts can be expanded...

@c3d , Is there anything to do here ? Do you need the log-level flag in global opts?

Going ahead and closing this for now as no activity.