Skip to content

No symlink from /var/lib/docker/containers/ to /var/log/containers  #13212

@dominicalston

Description

@dominicalston

According to the fluentd documentation, it states the kubelet creates symlinks that
capture the pod name, namespace, container name & Docker container ID
to the docker logs for pods in the /var/log/containers directory on the host. We see no such containers directory in the host.

Version

Host is running 4.4.27-boot2docker
kubernetes v1.4.0+776c994
features: Basic-Auth GSSAPI Kerberos SPNEGO

Server https://localhost:8443
openshift v1.4.1+3f9807a
kubernetes v1.4.0+776c994

Steps To Reproduce
  1. Create a pod with a volume spec to host path /var/lib/docker/containers and mount to /var/lib/docker/containers
  2. Examine the contents of /var/log/containers
Current Result

The /var/log/containers directory is empty.

Expected Result

A Docker container's logs might be in the directory:

/var/lib/docker/containers/997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b

and in the file:

997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b-json.log

where 997599971ee6... is the Docker ID of the running container.
The Kubernetes kubelet makes a symbolic link to this file on the host machine
in the /var/log/containers directory which includes the pod name and the Kubernetes
container name:

synthetic-logger-0.25lps-pod_default_synth-lgr-997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b.log
->
/var/lib/docker/containers/997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b/997599971ee6366d4a5920d25b79286ad45ff37a74494f262e3bc98d909d0a7b-json.log

Additional Information

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions