Logging integration doesn't work if Docker Root is not default /var/lib/docker
Article Number: 000020113
Situation
Issue
As of the time of this writing, Rancher Logging is broken when the Docker root is configured to something other than /var/lib/docker
.
This issue is tracked in GitHub issue #21112.
Pre-requisites
- Rancher 2.x managed/imported cluster with logging enabled.
- Docker root configured to something other than
/var/lib/docker
on the nodes (confirmed withdocker info | grep Root
).
Workaround
These steps will assume you have the Docker data root set to /other-docker-root
. Change /other-docker-root
to whatever your custom path is:
- Rancher UI -> Cluster -> System Project -> Workloads -> cattle-logging Namespace
- Find workload rancher-logging-fluentd-linux
- Edit YAML
- Edit volume dockerroot
- Change "Path on the Node" from
/var/lib/docker
to/other-docker-root
- Add volume (with the following details):
Volume Name: dockerrootcustom
Type: bind-mount
Path on the Node: /other-docker-root
Mount Point: /other-docker-root
- Click Save
At this point logging should be working with your non-default Docker root directory. You should be able to verify this on your logging target. Keep in mind it may take a few minutes for logs to show up there as fluentd is configured to clear its buffer every 60 seconds by default.