From a5e63ee72531c85ee527ce721022fffce3cfcf75 Mon Sep 17 00:00:00 2001 From: Carlos Camacho Date: Wed, 18 Apr 2018 15:41:58 +0200 Subject: [PATCH] Validate that there should not be XFS volumes with ftype=0 If we have XFS partitions formatted with ftype=0, the upgrades will fail because ftype=0 is incompatible with the docker overlayfs driver. Related-Bug: 1765121 Change-Id: I895fc83d148523c283664080b7b1bf75d53d9edb --- ...e-xfs-ftype-equals-0-8fdb1f8c99bee975.yaml | 13 +++++++ validations/check-ftype.yaml | 34 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 releasenotes/notes/validate-xfs-ftype-equals-0-8fdb1f8c99bee975.yaml create mode 100644 validations/check-ftype.yaml diff --git a/releasenotes/notes/validate-xfs-ftype-equals-0-8fdb1f8c99bee975.yaml b/releasenotes/notes/validate-xfs-ftype-equals-0-8fdb1f8c99bee975.yaml new file mode 100644 index 000000000..431b0ca9b --- /dev/null +++ b/releasenotes/notes/validate-xfs-ftype-equals-0-8fdb1f8c99bee975.yaml @@ -0,0 +1,13 @@ +--- +upgrade: + - | + Validate that there are no volumes formatted with XFS + and ftype=0. + Deployments from OpenStack Kilo or Liberty have XFS + partitions formatted with ftype=0, which is incompatible + with the docker overlayfs driver. + From OpenStack Newton, we have support for XFS ftype=1 + by default. + This check will make fail the pre-upgrade validations + if there are deployments coming back from Kilo or Liberty + and have XFS partitions with ftype=0. diff --git a/validations/check-ftype.yaml b/validations/check-ftype.yaml new file mode 100644 index 000000000..3f9ed40ae --- /dev/null +++ b/validations/check-ftype.yaml @@ -0,0 +1,34 @@ +--- +- hosts: undercloud, overcloud + vars: + metadata: + name: XFS ftype check + description: > + Check if there is at least 1 XFS volume + with ftype=0 in any deployed node. + groups: + - pre-upgrade + tasks: + - 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. + Run xfs_info in {{ ansible_fqdn }} and fix those volumes + before proceeding with the upgrade. + when: + - ftype.stdout == 'ftype=0'