Fixup cri-o metacopy mount options (#7287)
Ubuntu 18.04 crio package ships with 'mountopt = "nodev,metacopy=on"'
even if GA kernel is 4.15 (HWE Kernel can be more recent)
Fedora package ships without metacopy=on
Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
(cherry picked from commit 5c04bdd52b
)
This commit is contained in:
parent
60b405a7b7
commit
176df83e02
1 changed files with 3 additions and 5 deletions
|
@ -134,15 +134,13 @@
|
||||||
owner: root
|
owner: root
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
|
||||||
- name: Remove metacopy mount options for older kernels
|
# metacopy=on is available since 4.19 and was backported to RHEL 4.18 kernel
|
||||||
|
- name: Set metacopy mount options correctly
|
||||||
ini_file:
|
ini_file:
|
||||||
dest: /etc/containers/storage.conf
|
dest: /etc/containers/storage.conf
|
||||||
section: storage.options.overlay
|
section: storage.options.overlay
|
||||||
option: mountopt
|
option: mountopt
|
||||||
value: "\"nodev\""
|
value: '{{ ''"nodev"'' if ansible_kernel is version_compare(("4.18" if ansible_os_family == "RedHat" else "4.19"), "<") else ''"nodev,metacopy=on"'' }}'
|
||||||
when:
|
|
||||||
- ansible_distribution == "CentOS"
|
|
||||||
- ansible_distribution_major_version == "7"
|
|
||||||
|
|
||||||
- name: Create directory registries configs
|
- name: Create directory registries configs
|
||||||
file:
|
file:
|
||||||
|
|
Loading…
Reference in a new issue