filesystem tests: update ocfs2 fs size on Trusty

Using Ubuntu 14.04, test fails because 'blkid' < 2.21 doesn't recognize
'ocfs2' filesystem smaller than 108Mo:
6baa150398

filesystem: fix MKFS_FORCE_FLAGS for ocfs2

mkfs.ocfs2 -F won't work because mkfs.ocfs2 asks for a confirmation:

    $ mkfs.ocfs2 -F img
    mkfs.ocfs2 1.6.4
    Cluster stack: classic o2cb
    Overwriting existing ocfs2 partition.
    WARNING: Cluster check disabled.
    Proceed (y/N):

The undocumented 'x' switch must be used too.
This commit is contained in:
Pierre-Louis Bonicoli 2018-04-26 03:03:46 +02:00 committed by Brian Coca
parent 51af25bf60
commit 19356c03e8
5 changed files with 15 additions and 1 deletions

View file

@ -230,6 +230,7 @@ class Btrfs(Filesystem):
class Ocfs2(Filesystem): class Ocfs2(Filesystem):
MKFS = 'mkfs.ocfs2' MKFS = 'mkfs.ocfs2'
MKFS_FORCE_FLAGS = '-Fx'
class VFAT(Filesystem): class VFAT(Filesystem):

View file

@ -12,5 +12,5 @@ tested_filesystems:
xfs: {fssize: 20, grow: False} # grow requires a mounted filesystem xfs: {fssize: 20, grow: False} # grow requires a mounted filesystem
btrfs: {fssize: 100, grow: False} # grow not implemented btrfs: {fssize: 100, grow: False} # grow not implemented
vfat: {fssize: 20, grow: True} vfat: {fssize: 20, grow: True}
ocfs2: {fssize: 20, grow: False} # grow not implemented ocfs2: {fssize: '{{ ocfs2_fssize }}', grow: False} # grow not implemented
# untested: lvm, requires a block device # untested: lvm, requires a block device

View file

@ -4,6 +4,15 @@
msg: '{{ role_path|basename }}' msg: '{{ role_path|basename }}'
- import_tasks: setup.yml - import_tasks: setup.yml
- include_vars: "{{ lookup('first_found', search) }}"
vars:
search:
files:
- '{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml'
- 'default.yml'
paths:
- '../vars/'
- include_tasks: create_fs.yml - include_tasks: create_fs.yml
vars: vars:
dev: '{{ ansible_user_dir }}/ansible_testing/img' dev: '{{ ansible_user_dir }}/ansible_testing/img'

View file

@ -0,0 +1,2 @@
---
ocfs2_fssize: 108

View file

@ -0,0 +1,2 @@
---
ocfs2_fssize: 20