summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-01-26 14:31:18 -0800
committerGitHub <noreply@github.com>2018-01-26 14:31:18 -0800
commitca8d3f303a4d4e526c2cae823abba4475f7321e1 (patch)
treea24f7a40a78066456d9f2a0f9818f9068eb0540a
parentd7e38f486126d99f6eaa047ea84470f88dbbb826 (diff)
parentbf443f65b0158b4d32b631775b26d6e2ce067b95 (diff)
downloadopenshift-ca8d3f303a4d4e526c2cae823abba4475f7321e1.tar.gz
openshift-ca8d3f303a4d4e526c2cae823abba4475f7321e1.tar.bz2
openshift-ca8d3f303a4d4e526c2cae823abba4475f7321e1.tar.xz
openshift-ca8d3f303a4d4e526c2cae823abba4475f7321e1.zip
Merge pull request #6888 from kwoodson/fix_overlay_nodrive
Automatic merge from submit-queue. Removing dependency on the extra storage device. This pull request addresses the need to have configure docker storage to overlay without an extra drive.
-rw-r--r--roles/container_runtime/defaults/main.yml2
-rw-r--r--roles/container_runtime/templates/docker_storage_setup.j24
2 files changed, 5 insertions, 1 deletions
diff --git a/roles/container_runtime/defaults/main.yml b/roles/container_runtime/defaults/main.yml
index 8203d15f5..7ca3ed96f 100644
--- a/roles/container_runtime/defaults/main.yml
+++ b/roles/container_runtime/defaults/main.yml
@@ -64,7 +64,7 @@ docker_storage_setup_options:
root_lv_mount_path: "{{ docker_storage_path }}"
docker_storage_extra_options:
- "--storage-opt overlay2.override_kernel_check=true"
-- "--storage-opt overlay2.size={{ docker_storage_size }}"
+- "{{ '--storage-opt overlay2.size=' ~ docker_storage_size if container_runtime_docker_storage_setup_device is defined and container_runtime_docker_storage_setup_device != '' else '' }}"
- "--graph={{ docker_storage_path}}"
diff --git a/roles/container_runtime/templates/docker_storage_setup.j2 b/roles/container_runtime/templates/docker_storage_setup.j2
index b056087e0..ec540ea44 100644
--- a/roles/container_runtime/templates/docker_storage_setup.j2
+++ b/roles/container_runtime/templates/docker_storage_setup.j2
@@ -2,6 +2,7 @@
# /usr/lib/docker-storage-setup/docker-storage-setup.
#
# For more details refer to "man docker-storage-setup"
+{% if container_runtime_docker_storage_setup_device is defined and container_runtime_docker_storage_setup_device != '' %}
DEVS={{ container_runtime_docker_storage_setup_device }}
VG={{ docker_storage_setup_options.vg }}
DATA_SIZE={{ docker_storage_setup_options.data_size }}
@@ -9,4 +10,7 @@ STORAGE_DRIVER="{{ docker_storage_setup_options.storage_driver }}"
CONTAINER_ROOT_LV_NAME="{{ docker_storage_setup_options.root_lv_name }}"
CONTAINER_ROOT_LV_SIZE="{{ docker_storage_setup_options.root_lv_size }}"
CONTAINER_ROOT_LV_MOUNT_PATH="{{ docker_storage_setup_options.root_lv_mount_path }}"
+{% else %}
+STORAGE_DRIVER="{{ docker_storage_setup_options.storage_driver }}"
+{% endif %}
EXTRA_STORAGE_OPTIONS="{{ docker_storage_extra_options | join(' ') }}"