Browse Source

Add xfs ftype check during install

Since we know xfs ftype=0 is incompatible with the container usage,
let's fail hard with a message if the system has an improperly
configured filesystem.

Change-Id: I06f80003d7f3f6443f75f39973d4e68ac24673be
Related-Bug: #1765121
changes/29/613429/1
Alex Schultz 4 years ago
parent
commit
5e1ba52f79
  1. 25
      tasks/docker.yml

25
tasks/docker.yml

@ -10,6 +10,31 @@
state: present
reload: yes
# NOTE(aschultz): LP#1765121 - need to check that we don't have any ftype=0
# volumes because other wise docker is very unhappy
- name: Check if there are XFS volumes with ftype=0
become: true
shell: |
for dev in $(df -h | grep '/dev/' | grep -v 'tmp' | cut -d' ' -f1)
do
parseftype=$(xfs_info $dev | grep ftype=0);
if [[ ! -z "$parseftype" ]]; then
ftype="ftype=0";
break;
fi
done
echo $ftype;
register: ftype
changed_when: false
- name: Check ftype
fail:
msg: >
XFS volumes formatted using ftype=0 are incompatible
with the docker overlayfs driver.
when:
- ftype.stdout == 'ftype=0'
- name: ensure docker is installed
package:
name: docker

Loading…
Cancel
Save