Guest User

Untitled

a guest
Dec 10th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. # Docker 17.03.2 on RHEL/CentOS 7
  2.  
  3. Rancher has discovered a few issues when running Upstream Docker 17.03.2 on RHEL/CentOS 7. This document is being written to document recommendations for Docker configuration in order to ensure reliability while operating Kubernetes and Rancher with RHEL/CentOS 7.
  4.  
  5. ### Overlay2 Storage Driver
  6.  
  7. Currently, Upstream Docker 17.03.2 performs kernel version validations to enable overlay2. As official overlay2 support from the upstream Linux kernel was not enabled until version 4.0 or higher than the kernel. Red Hat backported overlay2 support to 3.10.0-514 of their kernel.
  8.  
  9. Overlay2 support can be enabled by setting the following contents in the `/etc/docker/daemon.json` file and restarting Docker. Please note that you must do this on a fresh docker installation, or remove all running containers before performing this action.
  10.  
  11. ```
  12. {
  13. "storage-driver": "overlay2",
  14. "storage-opts": [
  15. "overlay2.override_kernel_check=true"
  16. ]
  17. }
  18. ```
  19.  
  20. ### Cgroup Driver
  21.  
  22. Docker 17.03.2 running on RHEL/CentOS 7 with a containerized kubelet has an issue where cgroup `memory_kmem_usage` leaks for pods that are in constant `oom` state. This causes the kernel to eventually immediately kill all child processes for the container, which causes the kubelet to thrash while creating the new container processes. Eventually, docker can enter a hung/race-condition state.
  23.  
  24. This can be avoided by changing the cgroup driver for Docker from `cgroupfs` to the `systemd` driver by enabling the following setting in the `/etc/docker/daemon.json` file and restarting Docker.
  25.  
  26. ```
  27. {
  28. "exec-opts": [
  29. "native.cgroupdriver=systemd"
  30. ]
  31. }
  32. ```
  33.  
  34.  
  35. ### Setting these Options
  36.  
  37. Both of the above options can both be set in the `/etc/docker/daemon.json` file with the following contents:
  38. ```
  39. {
  40. "storage-driver": "overlay2",
  41. "storage-opts": [
  42. "overlay2.override_kernel_check=true"
  43. ],
  44. "exec-opts": [
  45. "native.cgroupdriver=systemd"
  46. ]
  47. }
  48. ```
Add Comment
Please, Sign In to add comment