Fix inconsistent gate and lint failures for os-swift

Gate was failing due to a race condition whereby the partition is not ready
and so the first mounted partitions fails to mount - causing hosts to fail.

Adding a retry/delay on failures in the mount task should resolve this issue.

ansible-lint failures were occurring due to a recent release of ansible-lint
Since the gate failure cannot be merged without the linting fix, this change
also contains I0cc973867d9c279eb6ea05decc5ebccfaa19c7b0 to break the co-
dependency between this and the other patch.

Change-Id: I3f4daaed764c4cad8a07408fedf8d0cba570a344
This commit is contained in:
Andy McCrae 2016-03-14 12:54:57 +00:00 committed by Travis Truman
parent 1c5fbb72d1
commit 9c509bd4c3
2 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,4 @@
ansible-lint
ansible-lint<=2.3.9
ansible>=1.9.1,<2.0.0
bashate
flake8

View File

@ -258,10 +258,10 @@
- 'swift1'
- 'swift2'
delegate_to: "{{ physical_host }}"
- name: Create the Swift mount points, fstab entries and mount the file systems
- name: Create the Swift fstab entries and mount the file systems
mount:
name: "/srv/{{ container_name }}_{{ item }}"
src: "/opt/{{container_name}}_{{ item }}.img"
src: "/opt/{{ container_name }}_{{ item }}.img"
fstype: xfs
opts: 'loop,noatime,nodiratime,nobarrier,logbufs=8'
passno: 0
@ -270,6 +270,10 @@
with_items:
- 'swift1'
- 'swift2'
register: mount_status
until: mount_status | success
retries: 5
delay: 2
delegate_to: "{{ physical_host }}"
- name: Swift extra lxc config
lxc_container: