Closed nhlfr closed 7 years ago
@dongsupark @iaguis PTAL
Can we also remove the sdjournal dependency? I tried github.com/coreos/go-systemd and it seems to remove a lot of stuff not related with go-systemd. This is not a big deal though.
FWIW, it seems glide rm github.com/coreos/go-systemd && make glide
works.
One question: what happens if there's no LogPath given in the ContainerCreate request?
Then we are in trouble, logging will not work and that would be a bug in upstream Kubernetes to fix. :)
But yeah, we can assume some default dir - /var/log/pods/
. Will push a change soon.
Really? Where? The only place that annotation is set is here https://github.com/kubernetes-incubator/rktlet/pull/147/files#diff-cc47267a78cd35bd77be1ffb2771d4abR236 - and the value is not empty. ;)
@nhlfr AFAICS the LogPath is sometimes set to an empty string by the caller, cri-tools, for example, https://github.com/kubernetes-incubator/cri-tools/blob/v0.2/pkg/validate/container.go#L364_L376. OTOH some tests set LogPath correctly, for example, https://github.com/kubernetes-incubator/cri-tools/blob/v0.2/pkg/validate/container.go#L502..L513, In that case the annotation is set correctly in rktlet.
@dongsupark done
@iaguis done
rktlet was using journal2cri binary for converting journald logs to CRI format. Container with that binary was injected into each pod. Unfortunately, it couldn't disginguish stdout and stderr output. It also wasn't very stable and reliable.
Currently rkt is able to store logs in CRI format in provided directory[1]. Therefore we can remove journal2cri completely and just point rkt to the directory which CRI provides.
Fixes #107
[1] https://github.com/rkt/rkt/pull/3798