summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorSteve Milner <smilner@redhat.com>2017-07-19 10:22:40 -0400
committerGiuseppe Scrivano <gscrivan@redhat.com>2017-08-03 17:20:52 +0200
commit941b8905feb30f2537360b002ae4b9a457b0f3e2 (patch)
tree00282dd92a46d7300405dc318933606e2b5dfcea /roles
parentc66d51f519acf2958a378c109750b86620e32122 (diff)
downloadopenshift-941b8905feb30f2537360b002ae4b9a457b0f3e2.tar.gz
openshift-941b8905feb30f2537360b002ae4b9a457b0f3e2.tar.bz2
openshift-941b8905feb30f2537360b002ae4b9a457b0f3e2.tar.xz
openshift-941b8905feb30f2537360b002ae4b9a457b0f3e2.zip
cri-o: Ensure overlay is available
Some distro releases may not have overlay loaded into the kernel. This change looks for overlay via lsmod and, if it isn't already there, uses modprobe to load it in and then drops a load config into /etc/modules-load.d/overlay.conf.
Diffstat (limited to 'roles')
-rw-r--r--roles/docker/tasks/systemcontainer_crio.yml20
-rw-r--r--roles/docker/templates/overlay.conf.j22
2 files changed, 22 insertions, 0 deletions
diff --git a/roles/docker/tasks/systemcontainer_crio.yml b/roles/docker/tasks/systemcontainer_crio.yml
index 651a20ea2..68f9d9649 100644
--- a/roles/docker/tasks/systemcontainer_crio.yml
+++ b/roles/docker/tasks/systemcontainer_crio.yml
@@ -25,6 +25,26 @@
state: present
when: not openshift.common.is_atomic | bool
+
+- name: Check that overlay is in the kernel
+ shell: lsmod | grep overlay
+ register: l_has_overlay_in_kernel
+ ignore_errors: yes
+
+
+- when: l_has_overlay_in_kernel.rc != 0
+ block:
+
+ - name: Add overlay to modprobe.d
+ template:
+ dest: /etc/modules-load.d/overlay.conf
+ src: overlay.conf.j2
+ backup: yes
+
+ - name: Manually modprobe overlay into the kernel
+ command: modprobe overlay
+
+
- block:
- name: Add http_proxy to /etc/atomic.conf
diff --git a/roles/docker/templates/overlay.conf.j2 b/roles/docker/templates/overlay.conf.j2
new file mode 100644
index 000000000..782f46c2e
--- /dev/null
+++ b/roles/docker/templates/overlay.conf.j2
@@ -0,0 +1,2 @@
+### {{ ansible_managed }}
+overlay