-
Notifications
You must be signed in to change notification settings - Fork 367
vc: virtLog() does not log container/pod IDs #519
Description
Description of problem
During some debug, I found entries such as:
(Jul 26 08:37:36 ubnt1604Master kata-runtime[7605]: time="2018-07-26T08:37:36.022838989Z" level=info msg="Virtual endpoint unmarshalled [{{c2d201b7-0c9b-4594-84f9-f6bf3721c951 br0 {eth0 02:00:ca:fe:00:00 [172.17.0.13/16 eth0]} {tap0 02:42:ac:11:00:0d []} 2 [0xc42000e210 0xc42000e220 0xc42000e228 0xc42000e230 0xc42000e238 0xc42000e240 0xc42000e248 0xc42000e250] [0xc42000e258 0xc42000e260 0xc42000e268 0xc42000e270 0xc42000e278 0xc42000e280 0xc42000e288 0xc42000e290]} {{{26 1500 0 eth0 02:42:ac:11:00:0d up|broadcast|multicast 69699 27 0 <nil> 0xc420198240 0 <nil> ether <nil> up 0 0 0} veth} [172.17.0.13/16 eth0] [{Ifindex: 26 Dst: <nil> Src: <nil> Gw: 172.17.0.1 Flags: [] Table: 254} {Ifindex: 26 Dst: 172.17.0.0/16 Src: 172.17.0.13 Gw: <nil> Flags: [] Table: 254}] {[] [] []}} false virtual}]" arch=amd64 command=kill name=kata-runtime pid=7605 source=virtcontainers
in the system journal. The come from around:
https://github.com/kata-containers/runtime/blob/master/virtcontainers/network.go#L502
Those lines have no container or pod IDs in them. Can I ask if we think it is possible to add those (which I can see might involve some additions to the func calls etc.). Also, these are not using the networkLogger that is defined higher up in that same file - do we think maybe they can/should be?
Expected result
Ideally it would be easy to correlate these log entries to the relevant pod/container/VM they were acting upon.
Actual result
I can tell the association at present, as I am performing a pretty linear test. If there were parallelism involved here then I think it would be much more difficult.
Yeah, I'll understand if it's hard to get that info into the right place to put out in the logs.